eyefi-config
eyefi-config copied to clipboard
Compilation error on Mac
Hi, I'm getting a compilation error when trying to compile the project on Mac Sierra with XCode.
here's the compile output:
cc -g -Wall -c -o eyefi-config.o eyefi-config.c
eyefi-config.c:235:3: warning: variable 'tmp' is uninitialized when used here
[-Wuninitialized]
tmp += addr[i];
^~~
eyefi-config.c:228:9: note: initialize the variable 'tmp' to silence this
warning
int tmp;
^
= 0
1 warning generated.
cc -g -Wall -c -o eyefi-unix.o eyefi-unix.c
eyefi-unix.c:199:16: warning: comparison of constant -1 with expression of type
'enum transfer_mode' is always false
[-Wtautological-constant-out-of-range-compare]
if (new_mode == -1) {
~~~~~~~~ ^ ~~
1 warning generated.
cc -g -Wall -c -o sha1.o sha1.c
cc -g -Wall -c -o md5.o md5.c
md5.c:289:30: warning: 'memset' call operates on objects of type
'struct MD5Context' while the size is based on a different type
'struct MD5Context *' [-Wsizeof-pointer-memaccess]
os_memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
~~~ ^~~
md5.c:289:30: note: did you mean to dereference the argument to 'sizeof' (and
multiply it by the number of elements)?
os_memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
^~~
1 warning generated.
cc -g -Wall -c -o eyefi-osx.o eyefi-osx.c
eyefi-osx.c:4:9: warning: implicit declaration of function 'fcntl' is invalid in
C99 [-Wimplicit-function-declaration]
return fcntl(fd, F_NOCACHE, 1);
^
eyefi-osx.c:4:19: error: use of undeclared identifier 'F_NOCACHE'
return fcntl(fd, F_NOCACHE, 1);
^
1 warning and 1 error generated.
make: *** [eyefi-osx.o] Error 1
any help is kindly appreciated.
Same error. Please help!
This one is fixed the issue https://github.com/btb/eyefi-config/tree/osx2