[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:29567] #include<linux/sched.h> のエラー
岩崎と申します。長文で失礼します。
現在カーネルモジュールを作っているのですが、
その際Debianに固有の問題なのではと思われるエラー
に遭遇しました。
問題を一言でいうと、#include<linux/sched.h>
の一行を入れると、sched.hもしくはsched.hの
インクルードするファイルから大量のエラーが出て
コンパイルが出来ないという現象です。
ところが、全く同じコードを使ってRedHatLinux6.2J
上でコンパイルした場合、全くエラーがでない
のです。
以下に私の環境でその現象を確認したサンプル
のソースを載せます。このソースでは、sched.hを
ただインクルードしてるだけで、sched.hで宣言
されている変数や関数は使っていませんが、最初に
この現象に遭遇したときはsched.h内のjffiesを参照
しようとしたときでした。hello_sched.cをhello.cと
してコンパイルするとエラーがでます。hello_nosched.c
をhello.cとした場合は、エラーもちゃんと出ずに
insmod,rmmodともにできます。
--------------hello_sched.c-----------------
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
int init_module()
{
printk("Hello, world with sched.h\n");
return 0;
}
void cleanup_module()
{
printk("Short is the life of a kernel module\n");
}
---------------------------------------------------
----------------------hello_nosched.c---------------------
#include <linux/kernel.h>
#include <linux/module.h>
#if CONFIG_MODVERSIONS==1
#define MODVERSIONS
#include <linux/modversions.h>
#endif
int init_module()
{
printk("Hello, world\n");
return 0;
}
void cleanup_module()
{
printk("Short is the life of a kernel module\n");
}
---------------------------------------------------------
---------------------Makefile----------------------------
CC=gcc
MODCFLAGS := -Wall -DMODULE -D__KERNEL__
hello.o: hello.c /usr/include/linux/version.h
$(CC) $(MODCFLAGS) -c hello.c
clean:
rm -rf *.o
--------------------------------------------------------
====================make時のメッセージ=====================
In file included from /usr/include/linux/sched.h:13,
from hello.c:3:
/usr/include/linux/times.h:5: parse error before `clock_t'
/usr/include/linux/times.h:5: warning: no semicolon at end of struct or union
/usr/include/linux/times.h:6: warning: data definition has no type or storage class
/usr/include/linux/times.h:7: parse error before `tms_cutime'
/usr/include/linux/times.h:7: warning: data definition has no type or storage class
/usr/include/linux/times.h:8: parse error before `tms_cstime'
/usr/include/linux/times.h:8: warning: data definition has no type or storage class
In file included from /usr/include/linux/timex.h:142,
from /usr/include/linux/sched.h:14,
from hello.c:3:
/usr/include/linux/time.h:10: parse error before `time_t'
/usr/include/linux/time.h:10: warning: no semicolon at end of struct or union
/usr/include/linux/time.h:12: parse error before `}'
/usr/include/linux/time.h: In function `timespec_to_jiffies':
/usr/include/linux/time.h:32: dereferencing pointer to incomplete type
/usr/include/linux/time.h:33: dereferencing pointer to incomplete type
/usr/include/linux/time.h: In function `jiffies_to_timespec':
/usr/include/linux/time.h:45: dereferencing pointer to incomplete type
/usr/include/linux/time.h:46: dereferencing pointer to incomplete type
/usr/include/linux/time.h: At top level:
/usr/include/linux/time.h:50: parse error before `time_t'
/usr/include/linux/time.h:50: warning: no semicolon at end of struct or union
/usr/include/linux/time.h:51: warning: data definition has no type or storage class
/usr/include/linux/time.h:83: field `it_interval' has incomplete type
/usr/include/linux/time.h:84: field `it_value' has incomplete type
/usr/include/linux/time.h:88: field `it_interval' has incomplete type
/usr/include/linux/time.h:89: field `it_value' has incomplete type
In file included from /usr/include/linux/sched.h:14,
from hello.c:3:
/usr/include/linux/timex.h:163: field `time' has incomplete type
In file included from /usr/include/linux/fs.h:272,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/hpfs_fs_i.h:5: parse error before `ino_t'
/usr/include/linux/hpfs_fs_i.h:5: warning: no semicolon at end of struct or union
/usr/include/linux/hpfs_fs_i.h:12: parse error before `:'
In file included from /usr/include/linux/fs.h:274,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/msdos_fs_i.h:36: parse error before `off_t'
/usr/include/linux/msdos_fs_i.h:36: warning: no semicolon at end of struct or union
In file included from /usr/include/linux/fs.h:275,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/umsdos_fs_i.h:62: field `msdos_info' has incomplete type
/usr/include/linux/umsdos_fs_i.h:69: parse error before `off_t'
/usr/include/linux/umsdos_fs_i.h:69: warning: no semicolon at end of struct or union
/usr/include/linux/umsdos_fs_i.h:73: parse error before `}'
In file included from /usr/include/linux/fs.h:276,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/iso_fs_i.h:11: parse error before `off_t'
/usr/include/linux/iso_fs_i.h:11: warning: no semicolon at end of struct or union
In file included from /usr/include/linux/fs.h:277,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/nfs_fs_i.h:109: parse error before `uid_t'
/usr/include/linux/nfs_fs_i.h:109: warning: no semicolon at end of struct or union
/usr/include/linux/nfs_fs_i.h:110: warning: data definition has no type or storage class
/usr/include/linux/nfs_fs_i.h:112: parse error before `}'
In file included from /usr/include/linux/fs.h:279,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/affs_fs_i.h:11: field `kc_lru_time' has incomplete type
In file included from /usr/include/linux/fs.h:281,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/efs_fs_i.h:12: parse error before `efs_block_t'
/usr/include/linux/efs_fs_i.h:12: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:13: parse error before `efs_ino_t'
/usr/include/linux/efs_fs_i.h:13: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:41: parse error before `u_short'
/usr/include/linux/efs_fs_i.h:41: warning: no semicolon at end of struct or union
/usr/include/linux/efs_fs_i.h:43: parse error before `di_uid'
/usr/include/linux/efs_fs_i.h:43: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:44: parse error before `di_gid'
/usr/include/linux/efs_fs_i.h:44: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:45: parse error before `di_size'
/usr/include/linux/efs_fs_i.h:45: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:46: parse error before `di_atime'
/usr/include/linux/efs_fs_i.h:46: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:47: parse error before `di_mtime'
/usr/include/linux/efs_fs_i.h:47: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:48: parse error before `di_ctime'
/usr/include/linux/efs_fs_i.h:48: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:49: parse error before `di_gen'
/usr/include/linux/efs_fs_i.h:49: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:51: parse error before `di_version'
/usr/include/linux/efs_fs_i.h:51: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:52: parse error before `di_spare'
/usr/include/linux/efs_fs_i.h:52: warning: data definition has no type or storage class
/usr/include/linux/efs_fs_i.h:57: parse error before `}'
In file included from /usr/include/linux/coda_fs_i.h:14,
from /usr/include/linux/fs.h:282,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/coda.h:198: parse error before `VolumeId'
/usr/include/linux/coda.h:198: warning: data definition has no type or storage class
/usr/include/linux/coda.h:199: parse error before `VnodeId'
/usr/include/linux/coda.h:199: warning: data definition has no type or storage class
/usr/include/linux/coda.h:200: parse error before `Unique_t'
/usr/include/linux/coda.h:200: warning: data definition has no type or storage class
/usr/include/linux/coda.h:201: parse error before `FileVersion'
/usr/include/linux/coda.h:201: warning: data definition has no type or storage class
/usr/include/linux/coda.h:207: parse error before `VolumeId'
/usr/include/linux/coda.h:207: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:208: warning: data definition has no type or storage class
/usr/include/linux/coda.h:209: parse error before `Unique'
/usr/include/linux/coda.h:209: warning: data definition has no type or storage class
/usr/include/linux/coda.h:210: warning: data definition has no type or storage class
/usr/include/linux/coda.h:215: parse error before `coda_f2i'
/usr/include/linux/coda.h: In function `coda_f2i':
/usr/include/linux/coda.h:219: dereferencing pointer to incomplete type
/usr/include/linux/coda.h:219: dereferencing pointer to incomplete type
/usr/include/linux/coda.h:220: dereferencing pointer to incomplete type
/usr/include/linux/coda.h:220: dereferencing pointer to incomplete type
/usr/include/linux/coda.h:222: dereferencing pointer to incomplete type
/usr/include/linux/coda.h:222: dereferencing pointer to incomplete type
/usr/include/linux/coda.h:222: dereferencing pointer to incomplete type
/usr/include/linux/coda.h:223: warning: control reaches end of non-void function
/usr/include/linux/coda.h: At top level:
/usr/include/linux/coda.h:254: parse error before `u_short'
/usr/include/linux/coda.h:254: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:264: parse error before `va_gen'
/usr/include/linux/coda.h:264: warning: data definition has no type or storage class
/usr/include/linux/coda.h:265: parse error before `va_flags'
/usr/include/linux/coda.h:265: warning: data definition has no type or storage class
/usr/include/linux/coda.h:269: parse error before `}'
/usr/include/linux/coda.h:342: parse error before `u_short'
/usr/include/linux/coda.h:342: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:343: warning: data definition has no type or storage class
/usr/include/linux/coda.h:344: parse error before `sid'
/usr/include/linux/coda.h:344: warning: data definition has no type or storage class
/usr/include/linux/coda.h:346: parse error before `}'
/usr/include/linux/coda.h:358: parse error before `ViceFid'
/usr/include/linux/coda.h:358: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:362: field `in' has incomplete type
/usr/include/linux/coda.h:370: field `ih' has incomplete type
/usr/include/linux/coda.h:371: parse error before `ViceFid'
/usr/include/linux/coda.h:371: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:373: parse error before `}'
/usr/include/linux/coda.h:378: parse error before `ino_t'
/usr/include/linux/coda.h:378: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:384: field `ih' has incomplete type
/usr/include/linux/coda.h:385: parse error before `ViceFid'
/usr/include/linux/coda.h:385: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:387: parse error before `}'
/usr/include/linux/coda.h:395: field `ih' has incomplete type
/usr/include/linux/coda.h:396: parse error before `ViceFid'
/usr/include/linux/coda.h:396: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:401: parse error before `}'
/usr/include/linux/coda.h:406: parse error before `caddr_t'
/usr/include/linux/coda.h:406: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:412: field `ih' has incomplete type
/usr/include/linux/coda.h:413: parse error before `ViceFid'
/usr/include/linux/coda.h:413: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:418: field `attr' has incomplete type
/usr/include/linux/coda.h:424: field `ih' has incomplete type
/usr/include/linux/coda.h:425: parse error before `ViceFid'
/usr/include/linux/coda.h:425: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:427: parse error before `}'
/usr/include/linux/coda.h:435: field `ih' has incomplete type
/usr/include/linux/coda.h:436: parse error before `ViceFid'
/usr/include/linux/coda.h:436: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:438: parse error before `}'
/usr/include/linux/coda.h:451: field `ih' has incomplete type
/usr/include/linux/coda.h:452: parse error before `ViceFid'
/usr/include/linux/coda.h:452: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:455: parse error before `}'
/usr/include/linux/coda.h:459: parse error before `ViceFid'
/usr/include/linux/coda.h:459: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:461: parse error before `}'
/usr/include/linux/coda.h:466: field `ih' has incomplete type
/usr/include/linux/coda.h:467: parse error before `ViceFid'
/usr/include/linux/coda.h:467: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:472: parse error before `}'
/usr/include/linux/coda.h:476: parse error before `ViceFid'
/usr/include/linux/coda.h:476: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:478: parse error before `}'
/usr/include/linux/coda.h:483: field `ih' has incomplete type
/usr/include/linux/coda.h:484: parse error before `ViceFid'
/usr/include/linux/coda.h:484: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:486: parse error before `}'
/usr/include/linux/coda.h:494: field `ih' has incomplete type
/usr/include/linux/coda.h:495: parse error before `ViceFid'
/usr/include/linux/coda.h:495: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:496: warning: data definition has no type or storage class
/usr/include/linux/coda.h:498: parse error before `}'
/usr/include/linux/coda.h:507: field `ih' has incomplete type
/usr/include/linux/coda.h:508: parse error before `ViceFid'
/usr/include/linux/coda.h:508: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:510: parse error before `destFid'
/usr/include/linux/coda.h:510: warning: data definition has no type or storage class
/usr/include/linux/coda.h:512: parse error before `}'
/usr/include/linux/coda.h:520: field `ih' has incomplete type
/usr/include/linux/coda.h:521: parse error before `ViceFid'
/usr/include/linux/coda.h:521: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:524: parse error before `}'
/usr/include/linux/coda.h:528: parse error before `ViceFid'
/usr/include/linux/coda.h:528: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:530: parse error before `}'
/usr/include/linux/coda.h:535: field `ih' has incomplete type
/usr/include/linux/coda.h:536: parse error before `ViceFid'
/usr/include/linux/coda.h:536: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:538: parse error before `}'
/usr/include/linux/coda.h:546: field `ih' has incomplete type
/usr/include/linux/coda.h:547: parse error before `ViceFid'
/usr/include/linux/coda.h:547: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:550: parse error before `}'
/usr/include/linux/coda.h:555: parse error before `caddr_t'
/usr/include/linux/coda.h:555: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:560: field `ih' has incomplete type
/usr/include/linux/coda.h:561: parse error before `ViceFid'
/usr/include/linux/coda.h:561: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:565: parse error before `}'
/usr/include/linux/coda.h:573: field `ih' has incomplete type
/usr/include/linux/coda.h:574: parse error before `ViceFid'
/usr/include/linux/coda.h:574: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:580: parse error before `caddr_t'
/usr/include/linux/coda.h:580: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:586: field `ih' has incomplete type
/usr/include/linux/coda.h:587: parse error before `ViceFid'
/usr/include/linux/coda.h:587: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:596: field `ih' has incomplete type
/usr/include/linux/coda.h:597: parse error before `ViceFid'
/usr/include/linux/coda.h:597: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:602: field `ih' has incomplete type
/usr/include/linux/coda.h:603: parse error before `ViceFid'
/usr/include/linux/coda.h:603: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:608: parse error before `ViceFid'
/usr/include/linux/coda.h:608: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:610: parse error before `}'
/usr/include/linux/coda.h:628: parse error before `ViceFid'
/usr/include/linux/coda.h:628: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:635: parse error before `ViceFid'
/usr/include/linux/coda.h:635: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:643: parse error before `ViceFid'
/usr/include/linux/coda.h:643: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:650: parse error before `ViceFid'
/usr/include/linux/coda.h:650: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:655: field `ih' has incomplete type
/usr/include/linux/coda.h:656: parse error before `ViceFid'
/usr/include/linux/coda.h:656: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:661: parse error before `data'
/usr/include/linux/coda.h:661: conflicting types for `data'
/usr/include/linux/coda.h:400: previous declaration of `data'
/usr/include/linux/coda.h:661: warning: data definition has no type or storage class
/usr/include/linux/coda.h:668: parse error before `caddr_t'
/usr/include/linux/coda.h:668: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:676: parse error before `ViceFid'
/usr/include/linux/coda.h:676: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:677: warning: data definition has no type or storage class
/usr/include/linux/coda.h:682: field `ih' has incomplete type
/usr/include/linux/coda.h:683: parse error before `ViceFid'
/usr/include/linux/coda.h:683: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:685: parse error before `}'
/usr/include/linux/coda.h:694: field `in' has incomplete type
/usr/include/linux/coda.h:710: field `ih' has incomplete type
/usr/include/linux/coda.h:711: field `coda_open' has incomplete type
/usr/include/linux/coda.h:712: field `coda_close' has incomplete type
/usr/include/linux/coda.h:713: field `coda_ioctl' has incomplete type
/usr/include/linux/coda.h:714: field `coda_getattr' has incomplete type
/usr/include/linux/coda.h:715: field `coda_setattr' has incomplete type
/usr/include/linux/coda.h:716: field `coda_access' has incomplete type
/usr/include/linux/coda.h:717: field `coda_lookup' has incomplete type
/usr/include/linux/coda.h:718: field `coda_create' has incomplete type
/usr/include/linux/coda.h:719: field `coda_remove' has incomplete type
/usr/include/linux/coda.h:720: field `coda_link' has incomplete type
/usr/include/linux/coda.h:721: field `coda_rename' has incomplete type
/usr/include/linux/coda.h:722: field `coda_mkdir' has incomplete type
/usr/include/linux/coda.h:723: field `coda_rmdir' has incomplete type
/usr/include/linux/coda.h:724: field `coda_readdir' has incomplete type
/usr/include/linux/coda.h:725: field `coda_symlink' has incomplete type
/usr/include/linux/coda.h:726: field `coda_readlink' has incomplete type
/usr/include/linux/coda.h:727: field `coda_fsync' has incomplete type
/usr/include/linux/coda.h:728: field `coda_inactive' has incomplete type
/usr/include/linux/coda.h:729: field `coda_vget' has incomplete type
/usr/include/linux/coda.h:730: field `coda_rdwr' has incomplete type
/usr/include/linux/coda.h:731: field `coda_open_by_path' has incomplete type
/usr/include/linux/coda.h:737: field `coda_root' has incomplete type
/usr/include/linux/coda.h:738: field `coda_open' has incomplete type
/usr/include/linux/coda.h:739: field `coda_ioctl' has incomplete type
/usr/include/linux/coda.h:741: field `coda_lookup' has incomplete type
/usr/include/linux/coda.h:742: field `coda_create' has incomplete type
/usr/include/linux/coda.h:743: field `coda_mkdir' has incomplete type
/usr/include/linux/coda.h:744: field `coda_readdir' has incomplete type
/usr/include/linux/coda.h:745: field `coda_readlink' has incomplete type
/usr/include/linux/coda.h:746: field `coda_vget' has incomplete type
/usr/include/linux/coda.h:748: field `coda_zapfile' has incomplete type
/usr/include/linux/coda.h:749: field `coda_zapdir' has incomplete type
/usr/include/linux/coda.h:750: field `coda_zapvnode' has incomplete type
/usr/include/linux/coda.h:751: field `coda_purgefid' has incomplete type
/usr/include/linux/coda.h:752: field `coda_rdwr' has incomplete type
/usr/include/linux/coda.h:753: field `coda_replace' has incomplete type
/usr/include/linux/coda.h:762: field `zapfile' has incomplete type
/usr/include/linux/coda.h:763: field `zapdir' has incomplete type
/usr/include/linux/coda.h:764: field `zapvnode' has incomplete type
/usr/include/linux/coda.h:765: field `purgefid' has incomplete type
/usr/include/linux/coda.h:766: field `replace' has incomplete type
/usr/include/linux/coda.h:776: parse error before `caddr_t'
/usr/include/linux/coda.h:776: warning: no semicolon at end of struct or union
/usr/include/linux/coda.h:779: parse error before `}'
/usr/include/linux/coda.h:784: field `vi' has incomplete type
In file included from /usr/include/linux/fs.h:282,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/coda_fs_i.h:30: field `c_fid' has incomplete type
/usr/include/linux/coda_fs_i.h:31: parse error before `u_short'
/usr/include/linux/coda_fs_i.h:31: warning: no semicolon at end of struct or union
/usr/include/linux/coda_fs_i.h:38: parse error before `}'
/usr/include/linux/coda_fs_i.h:47: parse error before `*'
/usr/include/linux/coda_fs_i.h:48: parse error before `ViceFid'
In file included from /usr/include/linux/fs.h:285,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/hfs_fs_i.h:29: parse error before `ino_t'
/usr/include/linux/hfs_fs_i.h:29: warning: no semicolon at end of struct or union
/usr/include/linux/hfs_fs_i.h:41: parse error before `}'
In file included from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/fs.h:318: parse error before `uid_t'
/usr/include/linux/fs.h:318: warning: no semicolon at end of struct or union
/usr/include/linux/fs.h:319: warning: data definition has no type or storage class
/usr/include/linux/fs.h:320: parse error before `ia_size'
/usr/include/linux/fs.h:320: warning: data definition has no type or storage class
/usr/include/linux/fs.h:321: parse error before `ia_atime'
/usr/include/linux/fs.h:321: warning: data definition has no type or storage class
/usr/include/linux/fs.h:322: parse error before `ia_mtime'
/usr/include/linux/fs.h:322: warning: data definition has no type or storage class
/usr/include/linux/fs.h:323: parse error before `ia_ctime'
/usr/include/linux/fs.h:323: warning: data definition has no type or storage class
/usr/include/linux/fs.h:325: parse error before `}'
In file included from /usr/include/linux/fs.h:339,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/quota.h:123: parse error before `time_t'
/usr/include/linux/quota.h:123: warning: no semicolon at end of struct or union
/usr/include/linux/quota.h:124: warning: data definition has no type or storage class
/usr/include/linux/quota.h:184: field `dq_dqb' has incomplete type
In file included from /usr/include/linux/fs.h:340,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/mount.h:23: parse error before `time_t'
/usr/include/linux/mount.h:23: warning: no semicolon at end of struct or union
/usr/include/linux/mount.h:24: warning: data definition has no type or storage class
/usr/include/linux/mount.h:26: parse error before `}'
/usr/include/linux/mount.h:35: field `mnt_dquot' has incomplete type
In file included from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/fs.h:351: parse error before `nlink_t'
/usr/include/linux/fs.h:351: warning: no semicolon at end of struct or union
/usr/include/linux/fs.h:352: warning: data definition has no type or storage class
/usr/include/linux/fs.h:353: parse error before `i_gid'
/usr/include/linux/fs.h:353: warning: data definition has no type or storage class
/usr/include/linux/fs.h:355: parse error before `i_size'
/usr/include/linux/fs.h:355: warning: data definition has no type or storage class
/usr/include/linux/fs.h:356: parse error before `i_atime'
/usr/include/linux/fs.h:356: warning: data definition has no type or storage class
/usr/include/linux/fs.h:357: parse error before `i_mtime'
/usr/include/linux/fs.h:357: warning: data definition has no type or storage class
/usr/include/linux/fs.h:358: parse error before `i_ctime'
/usr/include/linux/fs.h:358: warning: data definition has no type or storage class
/usr/include/linux/fs.h:387: field `hpfs_i' has incomplete type
/usr/include/linux/fs.h:389: field `msdos_i' has incomplete type
/usr/include/linux/fs.h:390: field `umsdos_i' has incomplete type
/usr/include/linux/fs.h:391: field `isofs_i' has incomplete type
/usr/include/linux/fs.h:398: field `coda_i' has incomplete type
/usr/include/linux/fs.h:400: field `hfs_i' has incomplete type
/usr/include/linux/fs.h:407: parse error before `}'
/usr/include/linux/fs.h: In function `mark_inode_dirty':
/usr/include/linux/fs.h:417: dereferencing pointer to incomplete type
/usr/include/linux/fs.h: At top level:
/usr/include/linux/fs.h:423: parse error before `uid_t'
/usr/include/linux/fs.h:423: warning: no semicolon at end of struct or union
/usr/include/linux/fs.h:425: parse error before `}'
/usr/include/linux/fs.h:431: parse error before `mode_t'
/usr/include/linux/fs.h:431: warning: no semicolon at end of struct or union
/usr/include/linux/fs.h:432: warning: data definition has no type or storage class
/usr/include/linux/fs.h:443: parse error before `}'
/usr/include/linux/fs.h:474: parse error before `off_t'
/usr/include/linux/fs.h:474: warning: no semicolon at end of struct or union
/usr/include/linux/fs.h:475: warning: data definition has no type or storage class
/usr/include/linux/fs.h:484: parse error before `}'
In file included from /usr/include/linux/fcntl.h:4,
from /usr/include/linux/fs.h:488,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/asm/fcntl.h:60: parse error before `off_t'
/usr/include/asm/fcntl.h:60: warning: no semicolon at end of struct or union
/usr/include/asm/fcntl.h:61: warning: data definition has no type or storage class
/usr/include/asm/fcntl.h:62: parse error before `l_pid'
/usr/include/asm/fcntl.h:62: warning: data definition has no type or storage class
In file included from /usr/include/linux/fs.h:514,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/hpfs_fs_sb.h:5: parse error before `ino_t'
/usr/include/linux/hpfs_fs_sb.h:5: warning: no semicolon at end of struct or union
/usr/include/linux/hpfs_fs_sb.h:12: parse error before `sb_uid'
/usr/include/linux/hpfs_fs_sb.h:12: warning: data definition has no type or storage class
/usr/include/linux/hpfs_fs_sb.h:13: parse error before `sb_gid'
/usr/include/linux/hpfs_fs_sb.h:13: warning: data definition has no type or storage class
/usr/include/linux/hpfs_fs_sb.h:15: parse error before `:'
/usr/include/linux/hpfs_fs_sb.h:16: parse error before `:'
In file included from /usr/include/linux/msdos_fs_sb.h:3,
from /usr/include/linux/fs.h:516,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/fat_cvf.h:31: parse error before `ssize_t'
/usr/include/linux/fat_cvf.h:31: warning: no semicolon at end of struct or union
/usr/include/linux/fat_cvf.h:32: parse error before `*'
/usr/include/linux/fat_cvf.h:32: parse error before `size_t'
/usr/include/linux/fat_cvf.h:32: `ssize_t' declared as function returning a function
/usr/include/linux/fat_cvf.h:32: warning: data definition has no type or storage class
/usr/include/linux/fat_cvf.h:39: parse error before `}'
In file included from /usr/include/linux/fs.h:516,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/msdos_fs_sb.h:10: parse error before `uid_t'
/usr/include/linux/msdos_fs_sb.h:10: warning: no semicolon at end of struct or union
/usr/include/linux/msdos_fs_sb.h:11: warning: data definition has no type or storage class
/usr/include/linux/msdos_fs_sb.h:17: parse error before `:'
/usr/include/linux/msdos_fs_sb.h:52: field `options' has incomplete type
In file included from /usr/include/linux/fs.h:517,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/iso_fs_sb.h:25: parse error before `mode_t'
/usr/include/linux/iso_fs_sb.h:25: warning: no semicolon at end of struct or union
/usr/include/linux/iso_fs_sb.h:26: warning: data definition has no type or storage class
/usr/include/linux/iso_fs_sb.h:27: parse error before `s_uid'
/usr/include/linux/iso_fs_sb.h:27: warning: data definition has no type or storage class
/usr/include/linux/iso_fs_sb.h:29: parse error before `}'
In file included from /usr/include/linux/fs.h:519,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/sysv_fs_sb.h:24: parse error before `nlink_t'
/usr/include/linux/sysv_fs_sb.h:24: warning: no semicolon at end of struct or union
/usr/include/linux/sysv_fs_sb.h:68: parse error before `}'
In file included from /usr/include/linux/smb_fs_sb.h:15,
from /usr/include/linux/fs.h:524,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/smb.h:83: parse error before `nlink_t'
/usr/include/linux/smb.h:83: warning: no semicolon at end of struct or union
/usr/include/linux/smb.h:84: conflicting types for `f_uid'
/usr/include/linux/fs.h:436: previous declaration of `f_uid'
/usr/include/linux/smb.h:84: warning: data definition has no type or storage class
/usr/include/linux/smb.h:85: parse error before `f_gid'
/usr/include/linux/smb.h:85: conflicting types for `f_gid'
/usr/include/linux/fs.h:436: previous declaration of `f_gid'
/usr/include/linux/smb.h:85: warning: data definition has no type or storage class
/usr/include/linux/smb.h:87: parse error before `f_size'
/usr/include/linux/smb.h:87: warning: data definition has no type or storage class
/usr/include/linux/smb.h:88: parse error before `f_atime'
/usr/include/linux/smb.h:88: warning: data definition has no type or storage class
/usr/include/linux/smb.h:89: parse error before `f_mtime'
/usr/include/linux/smb.h:89: warning: data definition has no type or storage class
/usr/include/linux/smb.h:90: parse error before `f_ctime'
/usr/include/linux/smb.h:90: warning: data definition has no type or storage class
/usr/include/linux/smb.h:93: parse error before `}'
/usr/include/linux/smb.h:96: field `attr' has incomplete type
In file included from /usr/include/linux/fs.h:524,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/smb_fs_sb.h:33: parse error before `pid_t'
/usr/include/linux/smb_fs_sb.h:33: warning: no semicolon at end of struct or union
/usr/include/linux/smb_fs_sb.h:58: parse error before `}'
In file included from /usr/include/linux/fs.h:525,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/hfs_fs_sb.h:19: parse error before `ino_t'
/usr/include/linux/hfs_fs_sb.h:48: parse error before `uid_t'
/usr/include/linux/hfs_fs_sb.h:48: warning: no semicolon at end of struct or union
/usr/include/linux/hfs_fs_sb.h:49: warning: data definition has no type or storage class
/usr/include/linux/hfs_fs_sb.h:51: parse error before `}'
In file included from /usr/include/linux/fs.h:526,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/adfs_fs_sb.h:23: parse error before `uid_t'
/usr/include/linux/adfs_fs_sb.h:23: warning: no semicolon at end of struct or union
/usr/include/linux/adfs_fs_sb.h:24: warning: data definition has no type or storage class
/usr/include/linux/adfs_fs_sb.h:36: parse error before `}'
In file included from /usr/include/linux/fs.h:528,
from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/usbdev_fs_sb.h:4: parse error before `uid_t'
/usr/include/linux/usbdev_fs_sb.h:4: warning: no semicolon at end of struct or union
/usr/include/linux/usbdev_fs_sb.h:5: warning: data definition has no type or storage class
/usr/include/linux/usbdev_fs_sb.h:7: parse error before `busuid'
/usr/include/linux/usbdev_fs_sb.h:7: warning: data definition has no type or storage class
/usr/include/linux/usbdev_fs_sb.h:8: parse error before `busgid'
/usr/include/linux/usbdev_fs_sb.h:8: warning: data definition has no type or storage class
/usr/include/linux/usbdev_fs_sb.h:10: parse error before `}'
In file included from /usr/include/linux/tty.h:20,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/fs.h:558: field `hpfs_sb' has incomplete type
/usr/include/linux/fs.h:561: field `isofs_sb' has incomplete type
/usr/include/linux/fs.h:563: field `sysv_sb' has incomplete type
/usr/include/linux/fs.h:568: field `smbfs_sb' has incomplete type
/usr/include/linux/fs.h:569: field `hfs_sb' has incomplete type
/usr/include/linux/fs.h:570: field `adfs_sb' has incomplete type
/usr/include/linux/fs.h:572: field `usbdevfs_sb' has incomplete type
/usr/include/linux/fs.h:604: parse error before `off_t'
/usr/include/linux/fs.h:607: parse error before `loff_t'
/usr/include/linux/fs.h:607: warning: no semicolon at end of struct or union
/usr/include/linux/fs.h:608: parse error before `*'
/usr/include/linux/fs.h:608: parse error before `size_t'
/usr/include/linux/fs.h:608: `ssize_t' declared as function returning a function
/usr/include/linux/fs.h:608: warning: data definition has no type or storage class
/usr/include/linux/fs.h:609: parse error before `*'
/usr/include/linux/fs.h:609: parse error before `size_t'
/usr/include/linux/fs.h:609: `ssize_t' declared as function returning a function
/usr/include/linux/fs.h:609: warning: data definition has no type or storage class
/usr/include/linux/fs.h:622: parse error before `}'
/usr/include/linux/fs.h:667: parse error before `uid_t'
/usr/include/linux/fs.h:668: parse error before `uid_t'
/usr/include/linux/fs.h:671: parse error before `uid_t'
/usr/include/linux/fs.h:701: parse error before `loff_t'
/usr/include/linux/fs.h: In function `locks_verify_locked':
/usr/include/linux/fs.h:709: dereferencing pointer to incomplete type
/usr/include/linux/fs.h:709: dereferencing pointer to incomplete type
/usr/include/linux/fs.h:709: dereferencing pointer to incomplete type
/usr/include/linux/fs.h:710: dereferencing pointer to incomplete type
/usr/include/linux/fs.h: At top level:
/usr/include/linux/fs.h:716: parse error before `loff_t'
/usr/include/linux/fs.h: In function `locks_verify_area':
/usr/include/linux/fs.h:722: `inode' undeclared (first use in this function)
/usr/include/linux/fs.h:722: (Each undeclared identifier is reported only once
/usr/include/linux/fs.h:722: for each function it appears in.)
/usr/include/linux/fs.h:724: `read_write' undeclared (first use in this function)
/usr/include/linux/fs.h:724: `filp' undeclared (first use in this function)
/usr/include/linux/fs.h: At top level:
/usr/include/linux/fs.h:845: parse error before `dev_t'
/usr/include/linux/fs.h:850: parse error before `find_inode_number'
/usr/include/linux/fs.h:850: warning: data definition has no type or storage class
/usr/include/linux/fs.h:884: parse error before `iunique'
/usr/include/linux/fs.h:884: parse error before `ino_t'
/usr/include/linux/fs.h:884: warning: data definition has no type or storage class
/usr/include/linux/fs.h:923: parse error before `generic_file_read'
/usr/include/linux/fs.h:923: parse error before `size_t'
/usr/include/linux/fs.h:923: warning: data definition has no type or storage class
/usr/include/linux/fs.h:924: parse error before `generic_file_write'
/usr/include/linux/fs.h:924: parse error before `size_t'
/usr/include/linux/fs.h:924: warning: data definition has no type or storage class
/usr/include/linux/fs.h:940: parse error before `char_read'
/usr/include/linux/fs.h:940: parse error before `size_t'
/usr/include/linux/fs.h:940: warning: data definition has no type or storage class
/usr/include/linux/fs.h:941: parse error before `block_read'
/usr/include/linux/fs.h:941: parse error before `size_t'
/usr/include/linux/fs.h:941: warning: data definition has no type or storage class
/usr/include/linux/fs.h:944: parse error before `char_write'
/usr/include/linux/fs.h:944: parse error before `size_t'
/usr/include/linux/fs.h:944: warning: data definition has no type or storage class
/usr/include/linux/fs.h:945: parse error before `block_write'
/usr/include/linux/fs.h:945: parse error before `size_t'
/usr/include/linux/fs.h:945: warning: data definition has no type or storage class
In file included from /usr/include/linux/tty.h:24,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/tty_driver.h:169: parse error before `off_t'
In file included from /usr/include/linux/tty.h:25,
from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/tty_ldisc.h:114: parse error before `ssize_t'
/usr/include/linux/tty_ldisc.h:114: warning: no semicolon at end of struct or union
/usr/include/linux/tty_ldisc.h:115: parse error before `*'
/usr/include/linux/tty_ldisc.h:116: parse error before `size_t'
/usr/include/linux/tty_ldisc.h:116: `ssize_t' declared as function returning a function
/usr/include/linux/tty_ldisc.h:116: warning: data definition has no type or storage class
/usr/include/linux/tty_ldisc.h:117: parse error before `*'
/usr/include/linux/tty_ldisc.h:118: parse error before `size_t'
/usr/include/linux/tty_ldisc.h:118: `ssize_t' declared as function returning a function
/usr/include/linux/tty_ldisc.h:118: warning: data definition has no type or storage class
/usr/include/linux/tty_ldisc.h:120: conflicting types for `ioctl'
/usr/include/linux/fs.h:612: previous declaration of `ioctl'
/usr/include/linux/tty_ldisc.h:123: conflicting types for `poll'
/usr/include/linux/fs.h:611: previous declaration of `poll'
/usr/include/linux/tty_ldisc.h:132: parse error before `}'
In file included from /usr/include/linux/sched.h:21,
from hello.c:3:
/usr/include/linux/tty.h:261: field `ldisc' has incomplete type
In file included from /usr/include/linux/sched.h:22,
from hello.c:3:
/usr/include/linux/sem.h:108: parse error before `key'
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:23,
from hello.c:3:
/usr/include/asm/signal.h:173: parse error before `size_t'
/usr/include/asm/signal.h:173: warning: no semicolon at end of struct or union
/usr/include/asm/signal.h:174: warning: data definition has no type or storage class
In file included from /usr/include/linux/signal.h:5,
from /usr/include/linux/sched.h:23,
from hello.c:3:
/usr/include/asm/siginfo.h:26: parse error before `pid_t'
/usr/include/asm/siginfo.h:26: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:26: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:27: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:28: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:38: parse error before `pid_t'
/usr/include/asm/siginfo.h:38: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:39: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:41: parse error before `}'
/usr/include/asm/siginfo.h:41: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:45: parse error before `pid_t'
/usr/include/asm/siginfo.h:45: warning: no semicolon at end of struct or union
/usr/include/asm/siginfo.h:46: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:48: parse error before `_utime'
/usr/include/asm/siginfo.h:48: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:49: parse error before `_stime'
/usr/include/asm/siginfo.h:49: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:50: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:62: parse error before `}'
/usr/include/asm/siginfo.h:62: warning: data definition has no type or storage class
/usr/include/asm/siginfo.h:63: parse error before `}'
/usr/include/asm/siginfo.h:63: warning: data definition has no type or storage class
In file included from /usr/include/linux/sched.h:23,
from hello.c:3:
/usr/include/linux/signal.h:15: parse error before `siginfo_t'
/usr/include/linux/signal.h:15: warning: no semicolon at end of struct or union
In file included from /usr/include/linux/string.h:37,
from /usr/include/linux/signal.h:64,
from /usr/include/linux/sched.h:23,
from hello.c:3:
/usr/include/asm/string.h:46: parse error before `size_t'
/usr/include/asm/string.h: In function `strncpy':
/usr/include/asm/string.h:47: number of arguments doesn't match prototype
/usr/include/linux/string.h:13: prototype declaration
/usr/include/asm/string.h:61: `src' undeclared (first use in this function)
/usr/include/asm/string.h:61: `dest' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:84: parse error before `size_t'
/usr/include/asm/string.h: In function `strncat':
/usr/include/asm/string.h:85: number of arguments doesn't match prototype
/usr/include/linux/string.h:15: prototype declaration
/usr/include/asm/string.h:102: `src' undeclared (first use in this function)
/usr/include/asm/string.h:102: `dest' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:130: parse error before `size_t'
/usr/include/asm/string.h: In function `strncmp':
/usr/include/asm/string.h:131: number of arguments doesn't match prototype
/usr/include/linux/string.h:25: prototype declaration
/usr/include/asm/string.h:149: `cs' undeclared (first use in this function)
/usr/include/asm/string.h:149: `ct' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:192: parse error before `strlen'
/usr/include/asm/string.h:206: parse error before `size_t'
/usr/include/asm/string.h: In function `__memcpy':
/usr/include/asm/string.h:220: `n' undeclared (first use in this function)
/usr/include/asm/string.h:220: `to' undeclared (first use in this function)
/usr/include/asm/string.h:220: `from' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:229: parse error before `size_t'
/usr/include/asm/string.h: In function `__constant_memcpy':
/usr/include/asm/string.h:231: `n' undeclared (first use in this function)
/usr/include/asm/string.h:233: `to' undeclared (first use in this function)
/usr/include/asm/string.h:235: `from' undeclared (first use in this function)
/usr/include/asm/string.h:285: warning: unreachable code at beginning of switch statement
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:302: parse error before `size_t'
/usr/include/asm/string.h: In function `memmove':
/usr/include/asm/string.h:303: number of arguments doesn't match prototype
/usr/include/linux/string.h:30: prototype declaration
/usr/include/asm/string.h:305: `dest' undeclared (first use in this function)
/usr/include/asm/string.h:305: `src' undeclared (first use in this function)
/usr/include/asm/string.h:311: `n' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:330: parse error before `size_t'
/usr/include/asm/string.h: In function `memchr':
/usr/include/asm/string.h:343: `c' undeclared (first use in this function)
/usr/include/asm/string.h:343: `cs' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:347: parse error before `size_t'
/usr/include/asm/string.h: In function `__memset_generic':
/usr/include/asm/string.h:355: `c' undeclared (first use in this function)
/usr/include/asm/string.h:355: `s' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:368: parse error before `size_t'
/usr/include/asm/string.h: In function `__constant_c_memset':
/usr/include/asm/string.h:382: `c' undeclared (first use in this function)
/usr/include/asm/string.h:382: `s' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:389: parse error before `strnlen'
/usr/include/asm/string.h:389: parse error before `size_t'
/usr/include/asm/string.h:390: conflicting types for `strnlen'
/usr/include/linux/string.h:22: previous declaration of `strnlen'
/usr/include/asm/string.h: In function `strnlen':
/usr/include/asm/string.h:404: `s' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:413: parse error before `size_t'
/usr/include/asm/string.h: In function `__constant_c_and_count_memset':
/usr/include/asm/string.h:417: `s' undeclared (first use in this function)
/usr/include/asm/string.h:419: `pattern' undeclared (first use in this function)
/usr/include/asm/string.h: At top level:
/usr/include/asm/string.h:472: parse error before `size_t'
/usr/include/asm/string.h: In function `memscan':
/usr/include/asm/string.h:473: number of arguments doesn't match prototype
/usr/include/linux/string.h:31: prototype declaration
/usr/include/asm/string.h:474: `size' undeclared (first use in this function)
/usr/include/asm/string.h:475: `addr' undeclared (first use in this function)
/usr/include/asm/string.h:482: `c' undeclared (first use in this function)
In file included from /usr/include/linux/sched.h:71,
from hello.c:3:
/usr/include/linux/resource.h: At top level:
/usr/include/linux/resource.h:22: field `ru_utime' has incomplete type
/usr/include/linux/resource.h:23: field `ru_stime' has incomplete type
In file included from hello.c:3:
/usr/include/linux/sched.h:143: parse error before `fd_set'
/usr/include/linux/sched.h:143: warning: no semicolon at end of struct or union
/usr/include/linux/sched.h:144: warning: data definition has no type or storage class
/usr/include/linux/sched.h:145: parse error before `close_on_exec_init'
/usr/include/linux/sched.h:145: warning: data definition has no type or storage class
/usr/include/linux/sched.h:146: parse error before `open_fds_init'
/usr/include/linux/sched.h:146: warning: data definition has no type or storage class
/usr/include/linux/sched.h:148: parse error before `}'
/usr/include/linux/sched.h:279: parse error before `pid_t'
/usr/include/linux/sched.h:279: warning: no semicolon at end of struct or union
/usr/include/linux/sched.h:280: warning: data definition has no type or storage class
/usr/include/linux/sched.h:281: parse error before `tty_old_pgrp'
/usr/include/linux/sched.h:281: warning: data definition has no type or storage class
/usr/include/linux/sched.h:282: parse error before `session'
/usr/include/linux/sched.h:282: warning: data definition has no type or storage class
/usr/include/linux/sched.h:310: parse error before `:'
/usr/include/linux/sched.h:312: warning: data definition has no type or storage class
/usr/include/linux/sched.h:313: parse error before `gid'
/usr/include/linux/sched.h:313: warning: data definition has no type or storage class
/usr/include/linux/sched.h:315: parse error before `groups'
/usr/include/linux/sched.h:315: warning: data definition has no type or storage class
/usr/include/linux/sched.h:317: parse error before `:'
/usr/include/linux/sched.h:347: parse error before `sas_ss_size'
/usr/include/linux/sched.h:347: warning: data definition has no type or storage class
/usr/include/linux/sched.h:355: parse error before `}'
/usr/include/linux/sched.h:429: field `task' has incomplete type
/usr/include/linux/sched.h: In function `hash_pid':
/usr/include/linux/sched.h:469: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:469: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:471: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:472: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:472: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:474: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `unhash_pid':
/usr/include/linux/sched.h:479: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:480: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:480: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:481: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:481: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `find_task_by_pid':
/usr/include/linux/sched.h:488: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:488: dereferencing pointer to incomplete type
In file included from hello.c:3:
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:538: parse error before `grp'
/usr/include/linux/sched.h:539: parse error before `grp'
/usr/include/linux/sched.h:543: parse error before `siginfo_t'
/usr/include/linux/sched.h:546: parse error before `pid_t'
/usr/include/linux/sched.h:547: parse error before `pid_t'
/usr/include/linux/sched.h:548: parse error before `pid_t'
/usr/include/linux/sched.h:553: parse error before `int'
/usr/include/linux/sched.h:554: parse error before `int'
/usr/include/linux/sched.h:555: parse error before `int'
/usr/include/linux/sched.h:558: parse error before `*'
/usr/include/linux/sched.h: In function `signal_pending':
/usr/include/linux/sched.h:562: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `recalc_sigpending':
/usr/include/linux/sched.h:577: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:577: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:580: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:580: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:581: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:581: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:582: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:582: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:583: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:583: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:586: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:586: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:587: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:587: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:590: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:590: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:593: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `on_sig_stack':
/usr/include/linux/sched.h:600: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:601: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:601: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:602: warning: control reaches end of non-void function
/usr/include/linux/sched.h: In function `sas_ss_flags':
/usr/include/linux/sched.h:606: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:608: warning: control reaches end of non-void function
/usr/include/linux/sched.h: In function `suser':
/usr/include/linux/sched.h:633: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:634: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `fsuser':
/usr/include/linux/sched.h:642: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:643: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: In function `capable':
/usr/include/linux/sched.h:658: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:663: dereferencing pointer to incomplete type
/usr/include/linux/sched.h: At top level:
/usr/include/linux/sched.h:688: parse error before `*'
/usr/include/linux/sched.h:688: warning: data definition has no type or storage class
/usr/include/linux/sched.h:690: parse error before `*'
/usr/include/linux/sched.h: In function `expand_files':
/usr/include/linux/sched.h:701: dereferencing pointer to incomplete type
/usr/include/linux/sched.h:706: dereferencing pointer to incomplete type
hello.c: At top level:
/usr/include/linux/coda.h:261: storage size of `va_atime' isn't known
/usr/include/linux/coda.h:262: storage size of `va_mtime' isn't known
/usr/include/linux/coda.h:263: storage size of `va_ctime' isn't known
/usr/include/linux/coda.h:563: storage size of `attr' isn't known
/usr/include/linux/fs.h:435: storage size of `f_owner' isn't known
/usr/include/linux/sched.h:305: storage size of `times' isn't known
make: *** [hello.o] Error 1
===========================================================
この現象を複数のDebianがインストールされた環境で確認しました。
開発をVMware上で行っているので、VMwareに絡んだ問題かと思った
のですが、PC上の環境でも発生しました。hello_nosched.cでは
ちゃんとmakeできて動作します。
・VMware2.0.4上でpotato(kernelは2.2.19pre17)をクリーンイン
ストールした直後
・同VMware上でpotatoをインストールし、kernel-source-2.2.19から
新たにソースを取得し、make-kpkg kernel_image,kernel_headers
を実行。生成されたdebファイルをdpkg -iした後。
・同VMware上でlinux-2.2.19.tar.bz2(UNIX USE 2001/9月号付録)
をmake xconfigの後、make depまで行った後。
・自作マシン(PenII 400Mhz,20GB,128MB)にpotatoをインス
トールし、kernel-source-2.2.18をmake-kpkgでビルド。kernel_
imageをdpkg -i でインストール。
これに比して、RedHatLinux6.2(J)上で上記コードをmakeすると、
以下の二つのケースで共にコンパイルが正常に通りました。
生成されたmoduleもちゃんとinsmod,rmmodできます。
・自作マシン(PenIII 450Mhz, 128MB ,20GB)上のRHL6.2Jで
2.2.14のカーネルをソースで取ってきてmakeしてインス
トールした場合(rpmをつかわずにインストール)。
・自作マシン(K6-350Mhz,64MB,8GB)上のRHL6.2Jで2.2.18の
カーネルを上と同様にソースからmakeした場合。
カーネルモジュールのプログラムはこれが初めてで、hello_*.cの
コードもインターネット上で公開されていたサンプルコードをほと
んどそのまま利用したものです。このコード以外にも linux/sched.h
をインクルードしたモジュールの例は数多くみかけるのですが、私
が遭遇した現象について書かれているところはありませんでした。
Googleで英語サイトも調べて見ましたが、これといって決め手になる
ものはありませんでした。どれも最後は「ソースコードを落とし直して
もう一度コンパイル」という方法が勧められていて、先ほど書いたように
それも試したのですが、だめでした。/usr/include/linuxや/usr/include/asm
がちゃんとカーネルソースにリンクしているかも確認してあります。
RHLで通るので、可能性としては双方のGCCなど関連するソフトの
バージョン違いかとにらんでいるのですが、以前Debianではkernel
もオリジナルのkernelに手を加えているという話を聞き、ならば
kernel周辺にも独自の変更が加えられている可能性もあるな、と
も考えています。私が何か非常に単純な見落としをしてる可能性も
あるかもしれませんが。。
どなたか何かご存じの方がいましたら、教えていただけると
ありがたいです。
----------------------------------
与えよ。さすれば与えられん。
Masatoshi Iwasaki
---pisogoo@xxxxxxxxx
-----http://homepage2.nifty.com/piso/
----------------------------------