summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/basic_functions.c2
-rw-r--r--ext/standard/php_ext_syslog.h6
-rw-r--r--ext/standard/syslog.c4
-rw-r--r--main/php_syslog.h3
4 files changed, 12 insertions, 3 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index ac45428ac4..021ad30fa8 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -507,10 +507,12 @@ function_entry basic_functions[] = {
PHP_FE(ezmlm_hash, NULL)
/* functions from syslog.c */
+#ifdef HAVE_SYSLOG_H
PHP_FE(openlog, NULL)
PHP_FE(syslog, NULL)
PHP_FE(closelog, NULL)
PHP_FE(define_syslog_variables, NULL)
+#endif
/* functions from lcg.c */
PHP_FE(lcg_value, NULL)
diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h
index aa597cf080..016c81163f 100644
--- a/ext/standard/php_ext_syslog.h
+++ b/ext/standard/php_ext_syslog.h
@@ -25,9 +25,9 @@
#include "php_syslog.h"
-extern PHP_MINIT_FUNCTION(syslog);
-extern PHP_RINIT_FUNCTION(syslog);
-extern PHP_RSHUTDOWN_FUNCTION(syslog);
+PHP_MINIT_FUNCTION(syslog);
+PHP_RINIT_FUNCTION(syslog);
+PHP_RSHUTDOWN_FUNCTION(syslog);
PHP_FUNCTION(openlog);
PHP_FUNCTION(syslog);
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index ef7f1a483f..24ceb9ab75 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -19,6 +19,8 @@
/* $Id$ */
#include "php.h"
+
+#ifdef HAVE_SYSLOG_H
#include "php_ini.h"
#include "zend_globals.h"
@@ -262,6 +264,8 @@ PHP_FUNCTION(syslog)
}
/* }}} */
+#endif
+
/*
* Local variables:
* tab-width: 4
diff --git a/main/php_syslog.h b/main/php_syslog.h
index cf70159133..279da71c92 100644
--- a/main/php_syslog.h
+++ b/main/php_syslog.h
@@ -4,8 +4,11 @@
#ifdef PHP_WIN32
#include "win32/syslog.h"
#else
+#include "php_config.h"
+#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#endif
+#endif
/*
* The SCO OpenServer 5 Development System (not the UDK)