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.

49 lines
1.5 KiB

  1. --- a/devtools/bin/Build
  2. +++ b/devtools/bin/Build
  3. @@ -320,6 +320,16 @@ then
  4. rel=`/usr/apollo/bin/bldt | grep Domain | awk '{ print $4 }' | sed -e 's/,//g'`
  5. fi
  6. +#
  7. +# LEDE/OpenWrt build system
  8. +#
  9. +if [ -n "$STAGING_DIR" -a -n "$OPENWRT_BUILD" ]
  10. +then
  11. + os="OpenWrt"
  12. + rel="any"
  13. + arch="any"
  14. +fi
  15. +
  16. if [ ! "$arch" -a ! "$os" -a ! "$rel" ]
  17. then
  18. arch=`uname -m | sed -e 's/ //g' -e 's/\//-/g'`
  19. --- a/include/sm/conf.h
  20. +++ b/include/sm/conf.h
  21. @@ -57,7 +57,7 @@
  22. # endif
  23. # ifndef HASRRESVPORT
  24. -# define HASRRESVPORT 1 /* has rrsevport(3) call */
  25. +# define HASRRESVPORT 0 /* has rrsevport(3) call */
  26. # endif
  27. /**********************************************************************
  28. @@ -1484,7 +1484,9 @@ extern void *malloc();
  29. # define SM_CONF_GETOPT 0 /* need a replacement for getopt(3) */
  30. # define HASUNAME 1 /* use System V uname(2) system call */
  31. # define HASUNSETENV 1 /* has unsetenv(3) call */
  32. -# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
  33. +# ifdef __GLIBC__
  34. +# define ERRLIST_PREDEFINED /* don't declare sys_errlist */
  35. +# endif
  36. # define GIDSET_T gid_t /* from <linux/types.h> */
  37. # ifndef HASGETUSERSHELL
  38. # define HASGETUSERSHELL 0 /* getusershell(3) broken in Slackware 2.0 */
  39. @@ -1522,6 +1524,7 @@ extern void *malloc();
  40. # if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
  41. # define HASSTRERROR 1 /* has strerror(3) */
  42. # endif
  43. +# define HASSTRERROR 1 /* Patch for LEDE/OpenWRT: has strerror(3) */
  44. # ifndef TZ_TYPE
  45. # define TZ_TYPE TZ_NONE /* no standard for Linux */
  46. # endif