rflynn / lanmap2

builds database/visualizations of LAN structure from passively sifted information
147 stars 41 forks source link

Compiling on OSX #30

Open darksheer opened 10 years ago

darksheer commented 10 years ago

Trying to get lanmap2 up and running on OSX 10.9, anyone have any success?

darksheer commented 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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                         ^

/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'

define _USE_FORTIFY_LEVEL 2

                           ^

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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                         ^

/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'

define _USE_FORTIFY_LEVEL 2

                           ^

./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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                ^

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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                          ^~~~~~~~~~~~~~~~~~~~~

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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                         ^

/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'

define _USE_FORTIFY_LEVEL 2

                           ^

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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                         ^

/usr/include/secure/_common.h:30:32: note: expanded from macro '_USE_FORTIFY_LEVEL'

define _USE_FORTIFY_LEVEL 2

                           ^

./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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                                                ^

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'

define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)

                          ^~~~~~~~~~~~~~~~~~~~~

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

rflynn commented 10 years ago

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.

darksheer commented 10 years ago

Ok, I'm not much of a C person, but if there is something I can do to assist let me know.