diff options
| author | Bruce Momjian <bruce@momjian.us> | 1998-01-28 02:29:40 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 1998-01-28 02:29:40 +0000 |
| commit | 8abd4243695985623887ce29ecc937d05ead008c (patch) | |
| tree | 7724076401375f4679623a9ab5c80d6f130ec340 /src/include | |
| parent | 54399bb2f99860fa48532c998d87774b8b737f72 (diff) | |
More deadlock code to check for escallation locks.
offsetof() addition to local socket size.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/libpq/pqcomm.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/include/libpq/pqcomm.h b/src/include/libpq/pqcomm.h index b3b67f8b73b..0145f262702 100644 --- a/src/include/libpq/pqcomm.h +++ b/src/include/libpq/pqcomm.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pqcomm.h,v 1.21 1998/01/27 15:35:22 momjian Exp $ + * $Id: pqcomm.h,v 1.22 1998/01/28 02:29:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -35,10 +35,10 @@ typedef union SockAddr { #define UNIXSOCK_PATH(sun,port) \ (sprintf((sun).sun_path, "/tmp/.s.PGSQL.%d", (port)) + \ - + 1 + sizeof ((sun).sun_family)) + offsetof(struct sockaddr_un, sun_path)) /* - * + 1 is for BSD-specific sizeof((sun).sun_len) - * We never actually set sun_len, and I can't think of a + * We do this because sun_len is in BSD's struct, while others don't. + * We never actually set BSD's sun_len, and I can't think of a * platform-safe way of doing it, but the code still works. bjm */ |
