Browse Source

syslog.h: allow prioritynames[]/facilitynames[] to be defined const
(selectable by #defining SYSLOG_NAMES_CONST)

Denis Vlasenko 17 years ago
parent
commit
a903e9ba46
1 changed files with 6 additions and 0 deletions
  1. 6 0
      include/sys/syslog.h

+ 6 - 0
include/sys/syslog.h

@@ -71,6 +71,9 @@ typedef struct _code {
 	int	c_val;
 } CODE;
 
+#ifdef SYSLOG_NAMES_CONST
+const
+#endif
 CODE prioritynames[] =
   {
     { "alert", LOG_ALERT },
@@ -119,6 +122,9 @@ CODE prioritynames[] =
 #define	LOG_FAC(p)	(((p) & LOG_FACMASK) >> 3)
 
 #ifdef SYSLOG_NAMES
+#ifdef SYSLOG_NAMES_CONST
+const
+#endif
 CODE facilitynames[] =
   {
     { "auth", LOG_AUTH },