sysklogd.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --- sysklogd-1.4.1/module.h.orig 1970-01-01 10:00:00.000000000 +1000
  2. +++ sysklogd-1.4.1/module.h 2005-11-24 01:40:09.000000000 +1000
  3. @@ -0,0 +1,62 @@
  4. +/* this file eliminates the need to include <kernel/module.h> */
  5. +/* Module definitions for klogd's module support */
  6. +struct kernel_sym
  7. +{
  8. + unsigned long value;
  9. + char name[60];
  10. +};
  11. +
  12. +struct module_symbol
  13. +{
  14. + unsigned long value;
  15. + const char *name;
  16. +};
  17. +
  18. +struct module_ref
  19. +{
  20. + struct module *dep; /* "parent" pointer */
  21. + struct module *ref; /* "child" pointer */
  22. + struct module_ref *next_ref;
  23. +};
  24. +
  25. +struct module_info
  26. +{
  27. + unsigned long addr;
  28. + unsigned long size;
  29. + unsigned long flags;
  30. + long usecount;
  31. +};
  32. +
  33. +
  34. +typedef struct { volatile int counter; } atomic_t;
  35. +
  36. +struct module
  37. +{
  38. + unsigned long size_of_struct; /* == sizeof(module) */
  39. + struct module *next;
  40. + const char *name;
  41. + unsigned long size;
  42. +
  43. + union
  44. + {
  45. + atomic_t usecount;
  46. + long pad;
  47. + } uc; /* Needs to keep its size - so says rth */
  48. +
  49. + unsigned long flags; /* AUTOCLEAN et al */
  50. +
  51. + unsigned nsyms;
  52. + unsigned ndeps;
  53. +
  54. + struct module_symbol *syms;
  55. + struct module_ref *deps;
  56. + struct module_ref *refs;
  57. + int (*init)(void);
  58. + void (*cleanup)(void);
  59. + const struct exception_table_entry *ex_table_start;
  60. + const struct exception_table_entry *ex_table_end;
  61. +#ifdef __alpha__
  62. + unsigned long gp;
  63. +#endif
  64. +};
  65. +
  66. --- sysklogd-1.4.1/ksym_mod.c.orig 2005-11-24 23:15:01.000000000 +1000
  67. +++ sysklogd-1.4.1/ksym_mod.c 2005-11-24 23:11:54.000000000 +1000
  68. @@ -89,17 +89,22 @@
  69. #include <errno.h>
  70. #include <sys/fcntl.h>
  71. #include <sys/stat.h>
  72. +#include <linux/linkage.h>
  73. +#include <linux/version.h>
  74. #if !defined(__GLIBC__)
  75. #include <linux/time.h>
  76. #include <linux/module.h>
  77. #else /* __GLIBC__ */
  78. +#if LINUX_VERSION_CODE >= 0x20500
  79. +#include "module.h"
  80. +#else
  81. #include <linux/module.h>
  82. +#endif
  83. extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
  84. extern int get_kernel_syms __P ((struct kernel_sym *__table));
  85. #endif /* __GLIBC__ */
  86. #include <stdarg.h>
  87. #include <paths.h>
  88. -#include <linux/version.h>
  89. #include "klogd.h"
  90. #include "ksyms.h"