Hi list,

currently we're unable to build OOTB on [Open]Solaris10/11.

The following revision commit caused the break:
https://redmine.kannel.org/projects/kannel/repository/diff/trunk/gwlib/log.c?rev=4875&rev_to=4854

Please find attached a "simple patch" that resolves the issue on Solaris10/11 machines, by adding the parts from <system-include-dir>/sys/syslog.h from a Linux machine. Not sure if this is the appropriate method here, I'm taking suggestions.

But, we should resolve, so we support Solaris again OOTB.

Stipe

--
-------------------------------------------------------------------
Kölner Landstrasse 419
40589 Düsseldorf, NRW, Germany

tolj.org system architecture      Kannel Software Foundation (KSF)
http://www.tolj.org/              http://www.kannel.org/

mailto:st_{at}_tolj.org           mailto:stolj_{at}_kannel.org
-------------------------------------------------------------------
Index: gwlib/log.c
===================================================================
--- gwlib/log.c (revision 4926)
+++ gwlib/log.c (working copy)
@@ -76,7 +76,55 @@
 #define        SYSLOG_NAMES
 #include <syslog.h>
 
+
+#ifdef __sun__
 /*
+ * Solaris lacks the following, which is available in Linux,
+ * so this is a copy of the <includedir>/sys/syslog.h from Linux.
+ */
+
+#define LOG_MAKEPRI(fac, pri)   (((fac) << 3) | (pri))
+
+#define INTERNAL_MARK   LOG_MAKEPRI(LOG_NFACILITIES, 0)
+
+#define LOG_AUTHPRIV    (10<<3) /* security/authorization messages (private) */
+#define LOG_FTP         (11<<3) /* ftp daemon */
+
+typedef struct _code {
+        char    *c_name;
+        int     c_val;
+} CODE;
+
+CODE facilitynames[] =
+  {
+    { "auth", LOG_AUTH },
+    { "authpriv", LOG_AUTHPRIV },
+    { "cron", LOG_CRON },
+    { "daemon", LOG_DAEMON },
+    { "ftp", LOG_FTP },
+    { "kern", LOG_KERN },
+    { "lpr", LOG_LPR },
+    { "mail", LOG_MAIL },
+    { "mark", INTERNAL_MARK },          /* INTERNAL */
+    { "news", LOG_NEWS },
+    { "security", LOG_AUTH },           /* DEPRECATED */
+    { "syslog", LOG_SYSLOG },
+    { "user", LOG_USER },
+    { "uucp", LOG_UUCP },
+    { "local0", LOG_LOCAL0 },
+    { "local1", LOG_LOCAL1 },
+    { "local2", LOG_LOCAL2 },
+    { "local3", LOG_LOCAL3 },
+    { "local4", LOG_LOCAL4 },
+    { "local5", LOG_LOCAL5 },
+    { "local6", LOG_LOCAL6 },
+    { "local7", LOG_LOCAL7 },
+    { NULL, -1 }
+  };
+#endif
+
+
+/*
  * Decode the syslog name to its int value
  */
 static int decode(char *name)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to