Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define SD_JOURNAL_SUPPRESS_LOCATION. Fixes #2 #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions php_systemd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 6 additions & 1 deletion systemd.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
#include "php_systemd.h"
#include <systemd/sd-journal.h>

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
};

Expand Down