sysklogd.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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,21 @@
  69. #include <errno.h>
  70. #include <sys/fcntl.h>
  71. #include <sys/stat.h>
  72. +#include <linux/version.h>
  73. #if !defined(__GLIBC__)
  74. #include <linux/time.h>
  75. #include <linux/module.h>
  76. #else /* __GLIBC__ */
  77. +#if LINUX_VERSION_CODE >= 0x20500
  78. +#include "module.h"
  79. +#else
  80. #include <linux/module.h>
  81. +#endif
  82. extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence));
  83. extern int get_kernel_syms __P ((struct kernel_sym *__table));
  84. #endif /* __GLIBC__ */
  85. #include <stdarg.h>
  86. #include <paths.h>
  87. -#include <linux/version.h>
  88. #include "klogd.h"
  89. #include "ksyms.h"