[gnutls-help] [gnutls-devel] gnutls 3.6.3

Filipp Gunbin fgunbin at fastmail.fm
Tue Jul 17 03:17:03 CEST 2018


I've got this error when compiling 3.6.3 on macOS.  Blindly changing
strdupa -> strdup helped.

  CC       tlsproxy/tlsproxy.o
tlsproxy/tlsproxy.c:70:16: warning: implicit declaration of function 'strdupa' is invalid in C99 [-Wimplicit-function-declaration]
  char *addr = strdupa (addrport);
               ^
tlsproxy/tlsproxy.c:70:16: warning: this function declaration is not a prototype [-Wstrict-prototypes]
tlsproxy/tlsproxy.c:70:9: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int'
      [-Wint-conversion]
  char *addr = strdupa (addrport);
        ^      ~~~~~~~~~~~~~~~~~~
tlsproxy/tlsproxy.c:72:9: warning: initializing 'char *' with an expression of type 'const char *' discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  char *port = defaultport;
        ^      ~~~~~~~~~~~
tlsproxy/tlsproxy.c:137:16: warning: implicit declaration of function 'strdupa' is invalid in C99 [-Wimplicit-function-declaration]
  char *addr = strdupa (addrport);
               ^
tlsproxy/tlsproxy.c:137:9: warning: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int'
      [-Wint-conversion]
  char *addr = strdupa (addrport);
        ^      ~~~~~~~~~~~~~~~~~~
tlsproxy/tlsproxy.c:139:9: warning: initializing 'char *' with an expression of type 'const char *' discards qualifiers
      [-Wincompatible-pointer-types-discards-qualifiers]
  char *port = defaultport;
        ^      ~~~~~~~~~~~
tlsproxy/tlsproxy.c:327:11: warning: declaration shadows a variable in the global scope [-Wshadow]
      int optind = 0;
          ^
/usr/include/getopt.h:78:12: note: previous declaration is here
extern int optind, opterr, optopt;
           ^
8 warnings generated.
  CCLD     tlsproxy/tlsproxy
libtool: warning: '-no-install' is ignored for x86_64-apple-darwin17.6.0
libtool: warning: assuming '-no-fast-install' instead
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.
Undefined symbols for architecture x86_64:
  "_strdupa", referenced from:
      _runlistener in tlsproxy.o
      _runproxy in tlsproxy.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)



More information about the Gnutls-help mailing list