musl_support 994 B

1234567891011121314151617181920212223242526272829303132333435
  1. --- a/Makefile
  2. +++ b/Makefile
  3. @@ -154,6 +154,12 @@ linux:
  4. NETGROUP="-DNETGROUP" TLI= VSYSLOG= BUGS= \
  5. EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
  6. +musl:
  7. + @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  8. + LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
  9. + NETGROUP= TLI= VSYSLOG= BUGS= \
  10. + EXTRA_CFLAGS="-DSYS_ERRLIST_DEFINED -DHAVE_STRERROR -DHAVE_WEAKSYMS -DINET6=1 -Dss_family=__ss_family -Dss_len=__ss_len" all
  11. +
  12. gnu:
  13. @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  14. LIBS=-lnsl RANLIB=ranlib ARFLAGS=rv AUX_OBJ=weak_symbols.o \
  15. --- a/tcpd.h
  16. +++ b/tcpd.h
  17. @@ -11,6 +11,16 @@
  18. #include <netinet/in.h>
  19. #include <stdio.h>
  20. +#ifndef __BEGIN_DECLS
  21. +#ifdef __cplusplus
  22. +#define __BEGIN_DECLS extern "C" {
  23. +#define __END_DECLS }
  24. +#else
  25. +#define __BEGIN_DECLS
  26. +#define __END_DECLS
  27. +#endif
  28. +#endif
  29. +
  30. __BEGIN_DECLS
  31. /* Structure to describe one communications endpoint. */