Lines 1002-1007
compile_test() {
Link Here
|
1002 |
fi |
1002 |
fi |
1003 |
;; |
1003 |
;; |
1004 |
|
1004 |
|
|
|
1005 |
file_operations) |
1006 |
# |
1007 |
# Determine if the 'file_operations' structure has |
1008 |
# 'ioctl', 'unlocked_ioctl' and 'compat_ioctl' fields. |
1009 |
# |
1010 |
echo "$CONFTEST_PREAMBLE |
1011 |
#include <linux/fs.h> |
1012 |
int conftest_file_operations(void) { |
1013 |
return offsetof(struct file_operations, ioctl); |
1014 |
}" > conftest$$.c |
1015 |
|
1016 |
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1 |
1017 |
rm -f conftest$$.c |
1018 |
|
1019 |
if [ -f conftest$$.o ]; then |
1020 |
echo "#define NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h |
1021 |
rm -f conftest$$.o |
1022 |
else |
1023 |
echo "#undef NV_FILE_OPERATIONS_HAS_IOCTL" >> conftest.h |
1024 |
fi |
1025 |
|
1026 |
echo "$CONFTEST_PREAMBLE |
1027 |
#include <linux/fs.h> |
1028 |
int conftest_file_operations(void) { |
1029 |
return offsetof(struct file_operations, unlocked_ioctl); |
1030 |
}" > conftest$$.c |
1031 |
|
1032 |
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1 |
1033 |
rm -f conftest$$.c |
1034 |
|
1035 |
if [ -f conftest$$.o ]; then |
1036 |
echo "#define NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h |
1037 |
rm -f conftest$$.o |
1038 |
else |
1039 |
echo "#undef NV_FILE_OPERATIONS_HAS_UNLOCKED_IOCTL" >> conftest.h |
1040 |
fi |
1041 |
|
1042 |
echo "$CONFTEST_PREAMBLE |
1043 |
#include <linux/fs.h> |
1044 |
int conftest_file_operations(void) { |
1045 |
return offsetof(struct file_operations, compat_ioctl); |
1046 |
}" > conftest$$.c |
1047 |
|
1048 |
$CC $CFLAGS -c conftest$$.c > /dev/null 2>&1 |
1049 |
rm -f conftest$$.c |
1050 |
|
1051 |
if [ -f conftest$$.o ]; then |
1052 |
echo "#define NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h |
1053 |
rm -f conftest$$.o |
1054 |
else |
1055 |
echo "#undef NV_FILE_OPERATIONS_HAS_COMPAT_IOCTL" >> conftest.h |
1056 |
fi |
1057 |
;; |
1058 |
|
1005 |
proc_dir_entry) |
1059 |
proc_dir_entry) |
1006 |
# |
1060 |
# |
1007 |
# Determine if the 'proc_dir_entry' structure has |
1061 |
# Determine if the 'proc_dir_entry' structure has |