Changeset 443 for trunk/src


Ignore:
Timestamp:
Oct 27, 2013, 9:13:08 PM (11 years ago)
Author:
katerina
Message:

Fix for ticket #347 (the --enable-khide option does not work on Linux 3.x)

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/samhain_erase.c

    r1 r443  
    7171/* The configure options (#defines) for the Kernel
    7272 */
     73#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
     74
     75#if SH_KERNEL_NUMERIC >= KERNEL_VERSION(2,6,33)
     76#include <generated/autoconf.h>
     77#else
     78#if SH_KERNEL_NUMERIC >= KERNEL_VERSION(2,6,19)
     79#include <linux/autoconf.h>
     80#else
    7381#include <linux/config.h>
    74 
    7582#ifdef CONFIG_MODVERSIONS
    7683#include <linux/modversions.h>
     84#endif
     85#endif
    7786#endif
    7887
  • trunk/src/samhain_hide.c

    r331 r443  
    101101
    102102#ifndef LINUX26
     103#ifndef __KERNEL__
    103104#define __KERNEL__
     105#endif
     106#ifndef MODULE
    104107#define MODULE
     108#endif
    105109#endif
    106110#define LINUX
     
    137141#endif
    138142
    139 #ifndef LINUX26
     143#if SH_KERNEL_NUMERIC < KERNEL_VERSION(2,6,0)
    140144#ifdef CONFIG_MODVERSIONS
    141145#include <linux/modversions.h>
    142146#endif
    143 #endif
    144 
     147#else
     148#ifndef LINUX26
     149#define LINUX26
     150#endif
     151#endif
    145152
    146153#ifdef LINUX26
     
    179186/* Include for lock_kernel().
    180187 */
     188#if SH_KERNEL_NUMERIC < KERNEL_VERSION(3,0,0)
    181189#include <linux/smp_lock.h>
     190#else
     191static inline void lock_kernel(void) { }
     192static inline void unlock_kernel(void) { }
     193#endif
    182194
    183195#if SH_KERNEL_NUMERIC >= SH_KERNEL_MIN
Note: See TracChangeset for help on using the changeset viewer.