predragmandic / s3backer

Automatically exported from code.google.com/p/s3backer
GNU General Public License v2.0
0 stars 0 forks source link

on OS X: http_io.c:759:22: error: use of undeclared identifier 'HOST_NAME_MAX' #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
cc -DHAVE_CONFIG_H -I.    -D_FILE_OFFSET_BITS=64 -D_DARWIN_USE_64_BIT_INODE 
-I/usr/local/Cellar/fuse4x/0.9.2/include/fuse  -g -O3 -pipe -Wall 
-Waggregate-return -Wcast-align -Wchar-subscripts -Wcomment -Wformat -Wimplicit 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-long-long 
-Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wswitch 
-Wtrigraphs -Wuninitialized -Wunused -Wwrite-strings -Wshadow 
-Wstrict-prototypes -Wcast-qual  -D_FILE_OFFSET_BITS=64 
-D_DARWIN_USE_64_BIT_INODE -I/usr/local/Cellar/fuse4x/0.9.2/include/fuse  -MT 
reset.o -MD -MP -MF .deps/reset.Tpo -c -o reset.o reset.c

http_io.c:759:22: error: use of undeclared identifier 'HOST_NAME_MAX'
        char content[HOST_NAME_MAX + 64];
                     ^
1 error generated.

Version 1.3.5

OS X: 10.8.4-x86_64
Xcode: 4.6.2
CLT: 4.6.0.0.1.1365549073

Original issue reported on code.google.com by vrak...@gmail.com on 5 Jun 2013 at 2:28

GoogleCodeExporter commented 9 years ago
Thanks, fixed in r489.

Here's the patch:

--- http_io.c   (revision 488)
+++ http_io.c   (working copy)
@@ -756,7 +756,7 @@
     if (new_value != -1) {
         u_char md5[MD5_DIGEST_LENGTH];
         char md5buf[MD5_DIGEST_LENGTH * 2 + 1];
-        char content[HOST_NAME_MAX + 64];
+        char content[_POSIX_HOST_NAME_MAX + 64];
         MD5_CTX ctx;

         /* Reset I/O info */

Original comment by archie.c...@gmail.com on 5 Jun 2013 at 4:53