ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/external/subpack/mail/sendmail/Makefile b/external/subpack/mail/sendmail/Makefile
new file mode 100644
index 0000000..a2819e7
--- /dev/null
+++ b/external/subpack/mail/sendmail/Makefile
@@ -0,0 +1,134 @@
+#
+# Copyright (C) 2017 Val Kulkov <val.kulkov@gmail.com>
+#
+# This is free software, licensed under the GNU General Public License v3.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sendmail
+PKG_VERSION:=8.16.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=ftp://ftp.sendmail.org/pub/sendmail
+PKG_HASH:=7886d5dc4b436b86175f32b5b9c7305c80787749847e2909bf99123ecc4e64ba
+PKG_MAINTAINER:=Val Kulkov <val.kulkov@gmail.com>
+
+PKG_LICENSE:=Sendmail
+PKG_LICENSE_FILES:=LICENSE
+PKG_CPE_ID:=cpe:/a:sendmail:sendmail
+
+PKG_INSTALL:=1
+PKG_BUILD_DEPENDS:=openssl
+
+include $(INCLUDE_DIR)/package.mk
+
+TARGET_OS:=OpenWrt
+SITECONFIG:=site.$(TARGET_OS).m4
+
+#
+# Uncomment the following sections that are currently commented out
+# to enable building and packaging Sendmail executables and default
+# configuration files into the "sendmail" package.
+#
+# Note that in this edition of the "sendmail" package:
+#   1. No init script is provided to start the Sendmail daemon.
+#   2. The initial configuration files in /etc/mail are likely inadequate
+#      for running the Sendmail daemon on your LEDE/OpenWrt device.
+#   3. You may have to "opkg install m4" to build Sendmail configuration files
+#      from customized mc files on your LEDE/OpenWrt device using m4, or
+#      alternatively you may use a Linux computer to build configuration
+#      files from customized mc files.
+#   4. Compiling and building the "sendmail" package will likely fail at
+#      the packaging stage if you have already selected and built the "ssmtp"
+#      package. "ssmtp" installs /usr/sbin/sendmail in the form of a symlink
+#      to /usr/sbin/ssmtp. Where /usr/sbin/sendmail is already present,
+#      copying the sendmail executable into /usr/sbin/sendmail results in
+#      an error:
+#        cp: not writing through dangling symlink
+#        ...
+#        lede/source/include/toplevel.mk:206: recipe for target 'package/feeds/packages/libmilter/compile' failed
+#
+# ANYONE WHO IS READING THIS MAKEFILE AND WHO HAS THE KNOWLEDGE AND DESIRE
+# TO COMPLETE PORTING OF SENDMAIL TO LEDE/OPENWRT PLATFORM IS ENCOURAGED
+# TO DO SO AND TAKE OVER THE MAINTAINERSHIP OF THIS PACKAGE FROM VAL KULKOV.
+#
+#define Package/sendmail
+#  SECTION:=mail
+#  CATEGORY:=Mail
+#  DEPENDS:=+libopenssl
+#  TITLE:=A general purpose internetwork mail routing facility
+#  URL:=http://sendmail.org/
+#endef
+#
+#define Package/sendmail/description
+#   Sendmail is a general purpose internetwork email routing facility that
+#   supports many kinds of mail-transfer and delivery methods, including
+#   the Simple Mail Transfer Protocol (SMTP) used for email transport over
+#   the Internet.
+#endef
+#
+#define Package/sendmail/conffiles
+#/etc/mail/helpfile
+#/etc/mail/sendmail.cf
+#/etc/mail/submit.cf
+#/etc/mail/statistics
+#endef
+
+define Package/libmilter-sendmail
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+libpthread
+  TITLE:=The sendmail Mail Filter API (Milter) library
+  URL:=http://sendmail.org/
+endef
+
+define Package/libmilter-sendmail/description
+  The sendmail Mail Filter API (Milter) is designed to allow third-party
+programs access to mail messages as they are being processed in order to
+filter meta-information and content.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+define Build/Prepare
+	$(Build/Prepare/Default)
+	$(CP) files/lm_getver.c $(PKG_BUILD_DIR)/libmilter/
+	$(CP) files/$(SITECONFIG) $(PKG_BUILD_DIR)/devtools/Site/
+	$(CP) files/$(TARGET_OS) $(PKG_BUILD_DIR)/devtools/OS/
+	$(CP) files/sharedlibrary.m4 $(PKG_BUILD_DIR)/devtools/M4/UNIX/
+	$(CP) $(PKG_BUILD_DIR)/cf/cf/generic-linux.mc $(PKG_BUILD_DIR)/cf/cf/sendmail.mc
+	$(SED) 's@TARGET_CC@$(TARGET_CC)@g' $(PKG_BUILD_DIR)/devtools/Site/$(SITECONFIG)
+	$(SED) 's@TARGET_CFLAGS@$(TARGET_CFLAGS)@g' $(PKG_BUILD_DIR)/devtools/Site/$(SITECONFIG)
+	$(SED) 's@STAGING_DIR@$(STAGING_DIR)@g' $(PKG_BUILD_DIR)/devtools/OS/$(TARGET_OS)
+endef
+
+define Build/Compile
+	$(call Build/Compile/Default,)
+	$(MAKE_VARS) $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/libmilter $(MAKE_FLAGS) all
+	$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/libmilter $(MAKE_FLAGS) DESTDIR="$(PKG_INSTALL_DIR)" install
+	$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR)/cf/cf $(MAKE_FLAGS) DESTDIR="$(PKG_INSTALL_DIR)" install-cf
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)/usr/include/libmilter $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/libmilter/* $(1)/usr/include/libmilter/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmilter.so* $(1)/usr/lib/
+endef
+
+define Package/libmilter-sendmail/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libmilter.so* $(1)/usr/lib/
+endef
+
+#define Package/sendmail/install
+#	$(INSTALL_DIR) $(1)/etc/mail $(1)/usr/bin $(1)/usr/sbin
+#	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/mail/* $(1)/etc/mail/
+#	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+#	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
+#endef
+
+$(eval $(call BuildPackage,libmilter-sendmail))
+#$(eval $(call BuildPackage,sendmail))
+
diff --git a/external/subpack/mail/sendmail/files/OpenWrt b/external/subpack/mail/sendmail/files/OpenWrt
new file mode 100644
index 0000000..c0a01a9
--- /dev/null
+++ b/external/subpack/mail/sendmail/files/OpenWrt
@@ -0,0 +1,61 @@
+dnl	DO NOT EDIT THIS FILE.
+dnl	Place personal settings in devtools/Site/site.config.m4
+
+define(`confDEPEND_TYPE', `CC-M')
+define(`confCCOPTS_SO', `-fPIC')
+define(`confSM_OS_HEADER', `sm_os_linux')
+define(`confLIBS', `-ldl')
+define(`confEBINDIR', `/usr/sbin')
+define(`confMKDIR', `mkdir')
+define(`confLIBSEARCHPATH', `STAGING_DIR/lib STAGING_DIR/usr/lib')
+APPENDDEF(`confLIBSEARCH', `crypt')
+
+define(`confMTCCOPTS', `-D_REENTRANT')
+define(`confMTLDOPTS', `-lpthread')
+define(`confLDOPTS_SO', `-shared')
+define(`confSONAME',`-Wl,-soname')
+
+define(`currentuser', esyscmd(`id -nu'))
+define(`currentgroup', esyscmd(`id -ng'))
+
+define(`confDONT_INSTALL_CATMAN',)
+define(`confNO_MAN_BUILD',)
+define(`confINCOWN', currentuser)
+define(`confINCGRP', currentgroup)
+define(`confINCMODE', `644')
+define(`confLIBOWN', currentuser)
+define(`confLIBGRP', currentgroup)
+define(`confLIBMODE', `644')
+define(`confMBINOWN', currentuser)
+define(`confMBINGRP', currentgroup)
+define(`confMBINMODE', `750')
+define(`confSBINOWN', currentuser)
+define(`confSBINGRP', currentgroup)
+define(`confSBINMODE', `755')
+define(`confUBINOWN', currentuser)
+define(`confUBINGRP', currentgroup)
+define(`confUBINMODE', `755')
+define(`confGBINOWN', currentuser)
+define(`confGBINGRP', currentgroup)
+define(`confGBINMODE', `755')
+define(`confMSPQOWN', currentuser)
+
+ifelse(confBLDVARIANT, `DEBUG',
+dnl Debug build
+`
+	define(`confOPTIMIZE',`-g -Wall')
+',
+dnl Optimized build
+confBLDVARIANT, `OPTIMIZED',
+`
+	define(`confOPTIMIZE',`-O2')
+',
+dnl Purify build
+confBLDVARIANT, `PURIFY',
+`
+	define(`confOPTIMIZE',`-g')
+',
+dnl default
+`
+	define(`confOPTIMIZE',`-O2')
+')
diff --git a/external/subpack/mail/sendmail/files/lm_getver.c b/external/subpack/mail/sendmail/files/lm_getver.c
new file mode 100644
index 0000000..c12d1e7
--- /dev/null
+++ b/external/subpack/mail/sendmail/files/lm_getver.c
@@ -0,0 +1,9 @@
+#include <stdio.h>
+#include "libmilter/mfapi.h"
+int main() {
+	printf("%d.%d.%d",
+		SM_LM_VRS_MAJOR(SMFI_VERSION),
+		SM_LM_VRS_MINOR(SMFI_VERSION),
+		SM_LM_VRS_PLVL(SMFI_VERSION)
+	);
+}
diff --git a/external/subpack/mail/sendmail/files/sharedlibrary.m4 b/external/subpack/mail/sendmail/files/sharedlibrary.m4
new file mode 100644
index 0000000..6096f90
--- /dev/null
+++ b/external/subpack/mail/sendmail/files/sharedlibrary.m4
@@ -0,0 +1,25 @@
+divert(0)dnl
+include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/links.m4')dnl
+bldLIST_PUSH_ITEM(`bldC_PRODUCTS', bldCURRENT_PRODUCT)dnl
+bldPUSH_TARGET(bldCURRENT_PRODUCT.so.confSOVER)dnl
+bldPUSH_INSTALL_TARGET(`install-'bldCURRENT_PRODUCT)dnl
+bldPUSH_CLEAN_TARGET(bldCURRENT_PRODUCT`-clean')dnl
+
+include(confBUILDTOOLSDIR`/M4/'bldM4_TYPE_DIR`/defines.m4')
+divert(bldTARGETS_SECTION)
+
+bldCURRENT_PRODUCT.so.confSOVER: ${BEFORE} ${bldCURRENT_PRODUCT`OBJS'}
+	${CC} ${LDOPTS_SO} -o bldCURRENT_PRODUCT.so.confSOVER confSONAME,bldCURRENT_PRODUCT.so.confSOVER ${bldCURRENT_PRODUCT`OBJS'}
+ifdef(`bldLINK_SOURCES', `bldMAKE_SOURCE_LINKS(bldLINK_SOURCES)')
+
+install-`'bldCURRENT_PRODUCT: bldCURRENT_PRODUCT.so.confSOVER
+
+ifdef(`bldINSTALLABLE', `	ifdef(`confMKDIR', `if [ ! -d ${DESTDIR}${LIBDIR} ]; then confMKDIR -p ${DESTDIR}${LIBDIR}; else :; fi ')
+	${LN} ${LNOPTS} bldCURRENT_PRODUCT.so.confSOVER ${DESTDIR}${LIBDIR}/bldCURRENT_PRODUCT.so
+	${INSTALL} -c -m 644 bldCURRENT_PRODUCT.so.confSOVER ${DESTDIR}${LIBDIR}')
+
+bldCURRENT_PRODUCT-clean:
+	rm -f ${OBJS} bldCURRENT_PRODUCT.so* ${MANPAGES}
+
+divert(0)
+COPTS+= confCCOPTS_SO
diff --git a/external/subpack/mail/sendmail/files/site.OpenWrt.m4 b/external/subpack/mail/sendmail/files/site.OpenWrt.m4
new file mode 100644
index 0000000..9c485e4
--- /dev/null
+++ b/external/subpack/mail/sendmail/files/site.OpenWrt.m4
@@ -0,0 +1,5 @@
+define(`confCC', `TARGET_CC')
+define(`confCCOPTS', `TARGET_CFLAGS')
+APPENDDEF(`confENVDEF',`-DSTARTTLS')
+APPENDDEF(`confLIBS', `-lssl -lcrypto')
+
diff --git a/external/subpack/mail/sendmail/patches/010-enable-nonroot-install.patch b/external/subpack/mail/sendmail/patches/010-enable-nonroot-install.patch
new file mode 100644
index 0000000..6093b6d
--- /dev/null
+++ b/external/subpack/mail/sendmail/patches/010-enable-nonroot-install.patch
@@ -0,0 +1,15 @@
+--- a/cf/cf/Makefile
++++ b/cf/cf/Makefile
+@@ -80,10 +80,10 @@ install:
+ install-cf:  install-sendmail-cf install-submit-cf
+ 
+ install-sendmail-cf: $(CF).cf
+-	$(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf
++	$(INSTALL) -c -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf
+ 
+ install-submit-cf: $(SUBMIT).cf
+-	$(INSTALL) -c -o $(CFOWN) -g $(CFGRP) -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf
++	$(INSTALL) -c -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf
+ 
+ depend:
+ 
diff --git a/external/subpack/mail/sendmail/patches/011-libmilter-so-version.patch b/external/subpack/mail/sendmail/patches/011-libmilter-so-version.patch
new file mode 100644
index 0000000..3b4df03
--- /dev/null
+++ b/external/subpack/mail/sendmail/patches/011-libmilter-so-version.patch
@@ -0,0 +1,14 @@
+--- a/libmilter/Makefile.m4
++++ b/libmilter/Makefile.m4
+@@ -9,7 +9,10 @@ define(`confMT', `true')
+ SMSRCDIR=ifdef(`confSMSRCDIR', `confSMSRCDIR', `${SRCDIR}/sendmail')
+ PREPENDDEF(`confINCDIRS', `-I${SMSRCDIR} ')
+ 
+-bldPRODUCT_START(`library', `libmilter')
++# obtain libmilter version
++define(`confSOVER', `esyscmd(`gcc -I../include -o lm_getver lm_getver.c && ./lm_getver')')
++
++bldPRODUCT_START(`sharedlibrary', `libmilter')
+ define(`bldINSTALLABLE', `true')
+ define(`LIBMILTER_EXTRAS', `errstring.c strl.c')
+ APPENDDEF(`confENVDEF', `-DNOT_SENDMAIL -Dsm_snprintf=snprintf')
diff --git a/external/subpack/mail/sendmail/patches/100-misc-os-musl-fixes.patch b/external/subpack/mail/sendmail/patches/100-misc-os-musl-fixes.patch
new file mode 100644
index 0000000..db6e7b5
--- /dev/null
+++ b/external/subpack/mail/sendmail/patches/100-misc-os-musl-fixes.patch
@@ -0,0 +1,49 @@
+--- a/devtools/bin/Build
++++ b/devtools/bin/Build
+@@ -320,6 +320,16 @@ then
+ 	rel=`/usr/apollo/bin/bldt | grep Domain | awk '{ print $4 }' | sed -e 's/,//g'`
+ fi
+ 
++#
++# LEDE/OpenWrt build system
++#
++if [ -n "$STAGING_DIR" -a -n "$OPENWRT_BUILD" ]
++then
++	os="OpenWrt"
++	rel="any"
++	arch="any"
++fi
++
+ if [ ! "$arch" -a ! "$os" -a ! "$rel" ]
+ then
+ 	arch=`uname -m | sed -e 's/ //g' -e 's/\//-/g'`
+--- a/include/sm/conf.h
++++ b/include/sm/conf.h
+@@ -57,7 +57,7 @@
+ # endif
+ 
+ # ifndef HASRRESVPORT
+-#  define HASRRESVPORT	1	/* has rrsevport(3) call */
++#  define HASRRESVPORT	0	/* has rrsevport(3) call */
+ # endif
+ 
+ /**********************************************************************
+@@ -1484,7 +1484,9 @@ extern void		*malloc();
+ #  define SM_CONF_GETOPT	0	/* need a replacement for getopt(3) */
+ #  define HASUNAME	1	/* use System V uname(2) system call */
+ #  define HASUNSETENV	1	/* has unsetenv(3) call */
+-#  define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
++#  ifdef __GLIBC__
++#   define ERRLIST_PREDEFINED	/* don't declare sys_errlist */
++#  endif
+ #  define GIDSET_T	gid_t	/* from <linux/types.h> */
+ #  ifndef HASGETUSERSHELL
+ #   define HASGETUSERSHELL 0	/* getusershell(3) broken in Slackware 2.0 */
+@@ -1522,6 +1524,7 @@ extern void		*malloc();
+ #  if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
+ #   define HASSTRERROR	1	/* has strerror(3) */
+ #  endif
++#  define HASSTRERROR  1	/* Patch for LEDE/OpenWRT: has strerror(3) */
+ #  ifndef TZ_TYPE
+ #   define TZ_TYPE	TZ_NONE		/* no standard for Linux */
+ #  endif
diff --git a/external/subpack/mail/sendmail/patches/102-pthreads-stack-size.patch b/external/subpack/mail/sendmail/patches/102-pthreads-stack-size.patch
new file mode 100644
index 0000000..aec19bf
--- /dev/null
+++ b/external/subpack/mail/sendmail/patches/102-pthreads-stack-size.patch
@@ -0,0 +1,44 @@
+This patch increases the stack size for pthreads from 80 KB, the default
+stack size for musl libc, to 2 MB. The default stack size for glibc is 8 MB.
+
+OpenDKIM, an application that depends on libmilter, segfaults if the stack
+size for pthreads is left unchanged at the musl default value of 80 KB.
+Apparently, OpenDKIM allocates blocks of 64 KB multiple times, which causes
+libmilter and therefore OpenDKIM to crash:
+https://git.alpinelinux.org/cgit/aports/commit/?id=95724d1bd53ae87f72e6388cb7323dbd8f84be9d
+
+This patch follows the patch suggested by an Alpine Linux user in bug report
+above. Also, a bug report has been filed upstream:
+https://sourceforge.net/p/opendkim/bugs/258/
+
+
+--- a/libmilter/libmilter.h
++++ b/libmilter/libmilter.h
+@@ -127,10 +127,10 @@ struct smfi_str
+ # define MI_SOCK_READ(s, b, l)	read(s, b, l)
+ # define MI_SOCK_READ_FAIL(x)	((x) < 0)
+ # define MI_SOCK_WRITE(s, b, l)	write(s, b, l)
+-
+-# define thread_create(ptid,wr,arg) pthread_create(ptid, NULL, wr, arg)
+ # define sthread_get_id()	pthread_self()
+ 
++extern int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg);
++
+ typedef pthread_mutex_t smutex_t;
+ # define smutex_init(mp)	(pthread_mutex_init(mp, NULL) == 0)
+ # define smutex_destroy(mp)	(pthread_mutex_destroy(mp) == 0)
+--- a/libmilter/main.c
++++ b/libmilter/main.c
+@@ -16,6 +16,12 @@ SM_RCSID("@(#)$Id: main.c,v 8.85 2013-11
+ #include <fcntl.h>
+ #include <sys/stat.h>
+ 
++int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg) {
++	pthread_attr_t attr;
++	pthread_attr_init(&attr);
++	pthread_attr_setstacksize(&attr,2*1024*1024);
++	return pthread_create(ptid, &attr, wr, arg);
++}
+ 
+ static smfiDesc_ptr smfi = NULL;
+ 
diff --git a/external/subpack/mail/sendmail/patches/103-create-install-dirs.patch b/external/subpack/mail/sendmail/patches/103-create-install-dirs.patch
new file mode 100644
index 0000000..fa99810
--- /dev/null
+++ b/external/subpack/mail/sendmail/patches/103-create-install-dirs.patch
@@ -0,0 +1,42 @@
+--- a/sendmail/Makefile.m4
++++ b/sendmail/Makefile.m4
+@@ -71,6 +71,7 @@ install-set-user-id: bldCURRENT_PRODUCT
+ 	${INSTALL} -c -o ${S`'BINOWN} -g ${S`'BINGRP} -m ${S`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}
+ 	for i in ${sendmailTARGET_LINKS}; do \
+ 		rm -f $$i; \
++		mkdir -p $$(dirname $$i); \
+ 		${LN} ${LNOPTS} ${M`'BINDIR}/sendmail $$i; \
+ 	done
+ 
+@@ -79,6 +80,7 @@ install-sm-mta: bldCURRENT_PRODUCT
+ 	${INSTALL} -c -o ${M`'BINOWN} -g ${M`'BINGRP} -m ${M`'BINMODE} bldCURRENT_PRODUCT ${DESTDIR}${M`'BINDIR}/sm-mta
+ 	for i in confMTA_LINKS; do \
+ 		rm -f $$i; \
++		mkdir -p $$(dirname $$i); \
+ 		${LN} ${LNOPTS} ${M`'BINDIR}/sm-mta $$i; \
+ 	done
+ 
+--- a/devtools/M4/UNIX/links.m4
++++ b/devtools/M4/UNIX/links.m4
+@@ -23,6 +23,7 @@ define(`bldMAKE_SOURCE_LINKS',
+ define(`bldMAKE_TARGET_LINKS',
+ `	for i in $2; do \
+ 		rm -f $$i; \
++		mkdir -p $$(dirname $$i); \
+ 		ln -s $1 $$i; \
+ 	done'
+ )dnl
+--- a/cf/cf/Makefile
++++ b/cf/cf/Makefile
+@@ -80,9 +80,11 @@ install:
+ install-cf:  install-sendmail-cf install-submit-cf
+ 
+ install-sendmail-cf: $(CF).cf
++	mkdir -p ${DESTDIR}$(MAILDIR)
+ 	$(INSTALL) -c -m $(CFMODE) $(CF).cf ${DESTDIR}$(MAILDIR)/sendmail.cf
+ 
+ install-submit-cf: $(SUBMIT).cf
++	mkdir -p ${DESTDIR}$(MAILDIR)
+ 	$(INSTALL) -c -m $(CFMODE) $(SUBMIT).cf ${DESTDIR}$(MAILDIR)/submit.cf
+ 
+ depend:
diff --git a/external/subpack/mail/sendmail/patches/210-cdefs.patch b/external/subpack/mail/sendmail/patches/210-cdefs.patch
new file mode 100644
index 0000000..53a93c3
--- /dev/null
+++ b/external/subpack/mail/sendmail/patches/210-cdefs.patch
@@ -0,0 +1,10 @@
+--- a/include/sm/os/sm_os_linux.h
++++ b/include/sm/os/sm_os_linux.h
+@@ -33,7 +33,6 @@
+ # endif /* LINUX_VERSION_CODE */
+ #endif /* SM_CONF_SHM */
+ 
+-#define SM_CONF_SYS_CDEFS_H	1
+ #ifndef SM_CONF_SEM
+ # define SM_CONF_SEM	2
+ #endif /* SM_CONF_SEM */