Open darksheer opened 10 years ago
Here is the error trail:
cc -W -Wall -std=gnu99 -Wno-unused -Wno-unused-parameter -ggdb -O0 -DDEBUG -c -o cap.o cap.c In file included from cap.c:19: ./util.h:53:8: error: expected parameter declarator size_t strlcpy(char dst, const char src, size_t size); ^ /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy' builtin___strlcpy_chk (dest, src, len, darwin_obsz (dest)) ^ /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
^
In file included from cap.c:19: ./util.h:53:8: error: expected ')' /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy' builtin___strlcpy_chk (dest, src, len, darwin_obsz (dest)) ^ /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
^
./util.h:53:8: note: to match this '(' /usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy' builtin___strlcpy_chk (dest, src, len, darwin_obsz (dest)) ^ /usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
^
In file included from cap.c:19:
./util.h:53:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
size_t strlcpy(char dst, const char src, size_t size);
^~~~~~~~~~~~
/usr/include/secure/_string.h:105:44: note: expanded from macro 'strlcpy'
builtin___strlcpy_chk (dest, src, len, darwin_obsz (dest))
^~~~~~~~
/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
^~~~~~~~~~~~~~~~~~~~~
In file included from cap.c:19: ./util.h:53:8: error: conflicting types for 'builtin_strlcpy_chk' /usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy' builtin_strlcpy_chk (dest, src, len, darwin_obsz (dest)) ^ ./util.h:53:8: note: '_builtinstrlcpy_chk' is a builtin with type 'unsigned long (char , const char , unsigned long, unsigned long)' /usr/include/secure/_string.h:105:3: note: expanded from macro 'strlcpy' builtin___strlcpy_chk (dest, src, len, darwin_obsz (dest)) ^ In file included from cap.c:19: ./util.h:54:8: error: expected parameter declarator size_t strlcat(char dst, const char src, size_t size); ^ /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat' builtin___strlcat_chk (dest, src, len, darwin_obsz (dest)) ^ /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
^
In file included from cap.c:19: ./util.h:54:8: error: expected ')' /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat' builtin___strlcat_chk (dest, src, len, darwin_obsz (dest)) ^ /usr/include/secure/_common.h:39:62: note: expanded from macro '__darwin_obsz'
^
/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'
^
./util.h:54:8: note: to match this '(' /usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat' builtin___strlcat_chk (dest, src, len, darwin_obsz (dest)) ^ /usr/include/secure/_common.h:39:53: note: expanded from macro '__darwin_obsz'
^
In file included from cap.c:19:
./util.h:54:8: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
size_t strlcat(char _dst, const char *src, size_t size);
^~~~~~~~~~~~
/usr/include/secure/_string.h:111:44: note: expanded from macro 'strlcat'
builtin___strlcat_chk (dest, src, len, darwin_obsz (dest))
^~~~~~~~
/usr/include/secure/_common.h:39:31: note: expanded from macro '__darwin_obsz'
^~~~~~~~~~~~~~~~~~~~~
In file included from cap.c:19: ./util.h:54:8: error: conflicting types for 'builtin_strlcat_chk' /usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat' builtin_strlcat_chk (dest, src, len, darwin_obsz (dest)) ^ ./util.h:54:8: note: '_builtinstrlcat_chk' is a builtin with type 'unsigned long (char , const char , unsigned long, unsigned long)' /usr/include/secure/_string.h:111:3: note: expanded from macro 'strlcat' builtin___strlcat_chk (dest, src, len, darwinobsz (dest)) ^ 2 warnings and 6 errors generated. make: ** [cap.o] Error 1
OK, the problem is easy enough to understand -- it appears that OS X 10.9 is defining 'strlcpy' whereas earlier versions did not. This causes a conflict with my util function of the same name. Need to figure out the idiomatic way of detecting this.
Ok, I'm not much of a C person, but if there is something I can do to assist let me know.
Trying to get lanmap2 up and running on OSX 10.9, anyone have any success?