Dirk Mueller
182cd5b113
- klogd-obsolete.patch: avoid use of obsolete function get_kernel_syms OBS-URL: https://build.opensuse.org/request/show/355764 OBS-URL: https://build.opensuse.org/package/show/Base:System/syslogd?expand=0&rev=131
31 lines
772 B
Diff
31 lines
772 B
Diff
Index: sysklogd-1.4.1/ksym_mod.c
|
|
===================================================================
|
|
--- sysklogd-1.4.1.orig/ksym_mod.c
|
|
+++ sysklogd-1.4.1/ksym_mod.c
|
|
@@ -89,6 +89,7 @@
|
|
#include <errno.h>
|
|
#include <sys/fcntl.h>
|
|
#include <sys/stat.h>
|
|
+#include <sys/syscall.h>
|
|
#include <stdarg.h>
|
|
#include <paths.h>
|
|
#include <limits.h>
|
|
@@ -105,7 +106,16 @@ struct kernel_sym
|
|
};
|
|
|
|
extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
|
|
-extern int get_kernel_syms __P ((struct kernel_sym *__table));
|
|
+
|
|
+static int get_kernel_syms(struct kernel_sym *table)
|
|
+{
|
|
+#ifdef SYS_get_kernel_syms
|
|
+ return syscall(SYS_get_kernel_syms, table);
|
|
+#else
|
|
+ errno = ENOSYS;
|
|
+ return -1;
|
|
+#endif
|
|
+}
|
|
|
|
static inline __off64_t seek64(int fd, uintptr_t address)
|
|
{
|