From 23575461b8cc55fa9c4132a58393b6438c2aff5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Sat, 27 Mar 2021 19:24:32 +0200 Subject: [PATCH 1/2] Define SD_JOURNAL_SUPPRESS_LOCATION. Fixes #2 --- php_systemd.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/php_systemd.h b/php_systemd.h index 2e2f2e6..14c1f72 100644 --- a/php_systemd.h +++ b/php_systemd.h @@ -8,4 +8,8 @@ PHP_FUNCTION(sd_journal_send); extern zend_module_entry systemd_module_entry; #define phpext_systemd_ptr &systemd_module_entry +#ifndef SD_JOURNAL_SUPPRESS_LOCATION +#define SD_JOURNAL_SUPPRESS_LOCATION 1 +#endif + #endif From 0f25ec9aab7747e85445a48213020ea6adda3658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Bidar?= Date: Fri, 15 Apr 2022 16:27:19 +0300 Subject: [PATCH 2/2] Provide arginfo --- systemd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/systemd.c b/systemd.c index 1eaf98b..a8b7ea4 100644 --- a/systemd.c +++ b/systemd.c @@ -5,8 +5,13 @@ #include "php_systemd.h" #include +ZEND_BEGIN_ARG_INFO_EX(arginfo_sd_journal_send, 0, 0, 3) +ZEND_ARG_TYPE_INFO(0, tags, IS_STRING, 0) +ZEND_ARG_VARIADIC_INFO(0, 3) +ZEND_END_ARG_INFO() + zend_function_entry systemd_functions[] = { - PHP_FE(sd_journal_send, NULL) + PHP_FE(sd_journal_send, arginfo_sd_journal_send) {NULL, NULL, NULL} // Sentinel };