Skip to content

Commit af5f95c

Browse files
cyberdeliaDaniel Farina
authored and
Daniel Farina
committed
Fix Darwin compatibility with regard to SIGPIPE socket sends
Editorialized very slightly by Daniel Farina <[email protected]>
1 parent 583f260 commit af5f95c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pg_logfebe.c

+7
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@
5151
#define htobe32(x) __DARWIN_OSSwapInt32(x)
5252
#define htobe64(x) __DARWIN_OSSwapInt64(x)
5353
#endif
54+
55+
#if defined(__darwin__)
56+
/*
57+
* On Macintosh, MSG_NOSIGNAL is not defined, but it has a moral
58+
* equivalent, SO_NOSIGPIPE.
59+
*/
60+
#define MSG_NOSIGNAL SO_NOSIGPIPE
5461
#endif
5562

5663
PG_MODULE_MAGIC;

0 commit comments

Comments
 (0)