source: scripts/patches/sysklogd-1.4.1-kernel_headers-1.patch@ 8fdbca4

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 8fdbca4 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 2.8 KB
RevLine 
[617118d]1Submitted By: DJ Lucas (dj_at_lucasit_dot_com)
2Date: 2003-08-17
3Initial Package Version: 1.4.1
4Origin: Linux Standard Base Project
5Description: This patch fixes a dependacy on kernel includes.
6 Specifically, it removes the need to have kernel/module.h around. It
7 is usable when building a linux-2.6 based system to get around
8 compile problems. Source link:
9 http://freestandards.org/pipermail/lsb-impl/2002-October/000466.html
10
11diff -Naur sysklogd-1.4.1-orig/Makefile sysklogd-1.4.1/Makefile
12--- sysklogd-1.4.1-orig/Makefile 1998-10-12 20:25:15.000000000 +0000
13+++ sysklogd-1.4.1/Makefile 2003-08-17 19:14:38.000000000 +0000
14@@ -3,7 +3,7 @@
15 CC= gcc
16 #CFLAGS= -g -DSYSV -Wall
17 #LDFLAGS= -g
18-CFLAGS= $(RPM_OPT_FLAGS) -O3 -DSYSV -fomit-frame-pointer -Wall -fno-strength-reduce
19+CFLAGS= $(RPM_OPT_FLAGS) -DSYSV -D_GNU_SOURCE -Wall
20 LDFLAGS= -s
21
22 # Look where your install program is.
23diff -Naur sysklogd-1.4.1-orig/ksym_mod.c sysklogd-1.4.1/ksym_mod.c
24--- sysklogd-1.4.1-orig/ksym_mod.c 2000-09-12 21:15:28.000000000 +0000
25+++ sysklogd-1.4.1/ksym_mod.c 2003-08-17 19:14:38.000000000 +0000
26@@ -93,7 +93,7 @@
27 #include <linux/time.h>
28 #include <linux/module.h>
29 #else /* __GLIBC__ */
30-#include <linux/module.h>
31+#include "module.h"
32 extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
33 extern int get_kernel_syms __P ((struct kernel_sym *__table));
34 #endif /* __GLIBC__ */
35diff -Naur sysklogd-1.4.1-orig/module.h sysklogd-1.4.1/module.h
36--- sysklogd-1.4.1-orig/module.h 1970-01-01 00:00:00.000000000 +0000
37+++ sysklogd-1.4.1/module.h 2003-08-17 19:14:38.000000000 +0000
38@@ -0,0 +1,62 @@
39+/* this file eliminates the need to include <kernel/module.h> */
40+/* Module definitions for klogd's module support */
41+struct kernel_sym
42+{
43+ unsigned long value;
44+ char name[60];
45+};
46+
47+struct module_symbol
48+{
49+ unsigned long value;
50+ const char *name;
51+};
52+
53+struct module_ref
54+{
55+ struct module *dep; /* "parent" pointer */
56+ struct module *ref; /* "child" pointer */
57+ struct module_ref *next_ref;
58+};
59+
60+struct module_info
61+{
62+ unsigned long addr;
63+ unsigned long size;
64+ unsigned long flags;
65+ long usecount;
66+};
67+
68+
69+typedef struct { volatile int counter; } atomic_t;
70+
71+struct module
72+{
73+ unsigned long size_of_struct; /* == sizeof(module) */
74+ struct module *next;
75+ const char *name;
76+ unsigned long size;
77+
78+ union
79+ {
80+ atomic_t usecount;
81+ long pad;
82+ } uc; /* Needs to keep its size - so says rth */
83+
84+ unsigned long flags; /* AUTOCLEAN et al */
85+
86+ unsigned nsyms;
87+ unsigned ndeps;
88+
89+ struct module_symbol *syms;
90+ struct module_ref *deps;
91+ struct module_ref *refs;
92+ int (*init)(void);
93+ void (*cleanup)(void);
94+ const struct exception_table_entry *ex_table_start;
95+ const struct exception_table_entry *ex_table_end;
96+#ifdef __alpha__
97+ unsigned long gp;
98+#endif
99+};
100+
Note: See TracBrowser for help on using the repository browser.