You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.8 KiB

  1. --- a/genconfig.sh
  2. +++ b/genconfig.sh
  3. @@ -379,12 +379,19 @@ case $FW in
  4. esac
  5. # UUID API
  6. -if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
  7. - echo "#define BSD_UUID" >> ${CONFIGFILE}
  8. -fi
  9. -if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
  10. - echo "#define LIB_UUID" >> ${CONFIGFILE}
  11. -fi
  12. +case $OS_NAME in
  13. + OpenWRT)
  14. + echo "#define LIB_UUID" >> ${CONFIGFILE}
  15. + ;;
  16. + *)
  17. + if grep uuid_create /usr/include/uuid.h > /dev/null 2>&1 ; then
  18. + echo "#define BSD_UUID" >> ${CONFIGFILE}
  19. + fi
  20. + if grep uuid_generate /usr/include/uuid/uuid.h > /dev/null 2>&1 ; then
  21. + echo "#define LIB_UUID" >> ${CONFIGFILE}
  22. + fi
  23. + ;;
  24. +esac
  25. # set V6SOCKETS_ARE_V6ONLY to 0 if it was not set above
  26. if [ -z "$V6SOCKETS_ARE_V6ONLY" ] ; then
  27. --- a/Makefile.linux
  28. +++ b/Makefile.linux
  29. @@ -74,7 +74,10 @@ CPPFLAGS += -DIPTABLES_143
  30. endif
  31. CFLAGS += $(shell $(PKG_CONFIG) --cflags libiptc)
  32. +#OpenWrt packager passes correct libraries
  33. +ifeq ($(TARGET_OPENWRT),)
  34. LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libiptc)
  35. +endif
  36. LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-L libiptc)
  37. LDFLAGS += $(shell $(PKG_CONFIG) --libs-only-other libiptc)
  38. else
  39. @@ -154,6 +157,8 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
  40. LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libnetfilter_conntrack)
  41. endif # ($(TEST),1)
  42. +# OpenWrt packager disables https server for IGD v2 and hardcodes libuuid support
  43. +ifeq ($(TARGET_OPENWRT),)
  44. LDLIBS += $(shell $(PKG_CONFIG) --static --libs-only-l libssl)
  45. TEST := $(shell $(PKG_CONFIG) --exists uuid && echo 1)
  46. @@ -162,6 +167,7 @@ LDLIBS += $(shell $(PKG_CONFIG) --static
  47. else
  48. $(info please install uuid-dev package / libuuid)
  49. endif # ($(TEST),1)
  50. +endif # ($(TARGET_OPENWRT,)
  51. TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o