diff options
| author | Theo Buehler <tb@openbsd.org> | 2026-08-29 10:12:48 +0200 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2026-08-29 10:12:48 +0200 |
| commit | f484ff53407f38c2c0599274dae19ab47dc5dc8a (patch) | |
| tree | 9fd9b0f6f9331ea3a70f4b78cd3456f8f1b7b5c7 /include | |
| parent | 89d3233a7e770ca43c9168fe2672f9c27615b87d (diff) | |
| parent | 87c1738284ad9062cf344d038df2f3953030c1dd (diff) | |
| download | portable-f484ff53407f38c2c0599274dae19ab47dc5dc8a.tar.gz portable-f484ff53407f38c2c0599274dae19ab47dc5dc8a.tar.bz2 portable-f484ff53407f38c2c0599274dae19ab47dc5dc8a.zip | |
Land #1367 - fix vsyslog fallback for AIX
Diffstat (limited to 'include')
| -rw-r--r-- | include/compat/syslog.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/include/compat/syslog.h b/include/compat/syslog.h index 3528eb3..c7a2608 100644 --- a/include/compat/syslog.h +++ b/include/compat/syslog.h | |||
| @@ -36,23 +36,3 @@ void vsyslog_r(int, struct syslog_data *, const char *, va_list); | |||
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | #endif | 38 | #endif |
| 39 | |||
| 40 | #ifdef _AIX | ||
| 41 | #ifdef HAVE_SYSLOG | ||
| 42 | #include <stdlib.h> | ||
| 43 | void vsyslog(int facility_priority, const char *format, va_list arglist) { | ||
| 44 | char *msg = NULL; | ||
| 45 | vasprintf(&msg, format, arglist); | ||
| 46 | |||
| 47 | if (!msg) | ||
| 48 | return; | ||
| 49 | |||
| 50 | syslog(facility_priority, "%s", msg); | ||
| 51 | free(msg); | ||
| 52 | } | ||
| 53 | #endif /* HAVE_SYSLOG */ | ||
| 54 | |||
| 55 | void vsyslog_r(int pri, struct syslog_data *data, const char *fmt, va_list ap) { | ||
| 56 | vsyslog(pri, fmt, ap); | ||
| 57 | } | ||
| 58 | #endif /* AIX */ | ||
