public
Description: Phusion Passenger (mod_rails)
Homepage: http://www.modrails.com/
Clone URL: git://github.com/FooBarWidget/passenger.git
Search Repo:
Click here to lend your support to: passenger and make a donation at www.pledgie.com !
Fix compilation on OS X.
Hongli Lai (Phusion) (author)
Tue May 06 12:04:48 -0700 2008
commit  ca88f5c24a147a04e4f94390ccfced863dfed96c
tree    19891c97828daa937df16285911e913e95fc8353
parent  8ec6efa06d48810822b3dedf6a26cca3576f5363
...
436
437
438
 
 
439
440
441
...
436
437
438
439
440
441
442
443
0
@@ -436,6 +436,8 @@ public:
0
     struct iovec vec;
0
     char dummy[1];
0
     #ifdef __APPLE__
0
+      // File descriptor passing macros (CMSG_*) seem to be broken
0
+      // on 64-bit MacOS X. This structure works around the problem.
0
       struct {
0
         struct cmsghdr header;
0
         int fd;
...
43
44
45
46
 
 
 
 
 
 
 
 
47
48
49
...
97
98
99
 
 
100
101
102
...
43
44
45
 
46
47
48
49
50
51
52
53
54
55
56
...
104
105
106
107
108
109
110
111
0
@@ -43,7 +43,14 @@ send_fd(VALUE self, VALUE socket_fd, VALUE fd_to_send) {
0
   struct msghdr msg;
0
   struct iovec vec;
0
   char dummy[1];
0
-  char control_data[CMSG_SPACE(sizeof(int))];
0
+  #ifdef __APPLE__
0
+    struct {
0
+      struct cmsghdr header;
0
+      int fd;
0
+    } control_data;
0
+  #else
0
+    char control_data[CMSG_SPACE(sizeof(int))];
0
+  #endif
0
   struct cmsghdr *control_header;
0
   int control_payload;
0
   
0
@@ -97,6 +104,8 @@ recv_fd(VALUE self, VALUE socket_fd) {
0
   struct iovec vec;
0
   char dummy[1];
0
   #ifdef __APPLE__
0
+    // File descriptor passing macros (CMSG_*) seem to be broken
0
+    // on 64-bit MacOS X. This structure works around the problem.
0
     struct {
0
       struct cmsghdr header;
0
       int fd;

Comments

    No one has commented yet.