eyefi-config icon indicating copy to clipboard operation
eyefi-config copied to clipboard

Compilation error on Mac

Open gilbar opened this issue 8 years ago • 2 comments

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.

gilbar avatar Aug 26 '17 18:08 gilbar

Same error. Please help!

sandeeppotdar avatar Jan 14 '18 02:01 sandeeppotdar

This one is fixed the issue https://github.com/btb/eyefi-config/tree/osx2

doskoi avatar Feb 12 '20 05:02 doskoi