-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 25 Jun 2003 14:03:09 -0700 (PDT), tirumal b wrote:

>    I tried to create certain files in /proc using the
> proc_fs.h interface but i get the following errors. I
> have also included my program too. Could any one tell
> me what is the error.
> 
> Thank you
> 
> 
> gcc -c example.c
> In file included from example.c:2:
> /usr/include/linux/proc_fs.h:47: parse error before
> "off_t"
> /usr/include/linux/proc_fs.h:51: parse error before
> "off_t"

> /*example.c*/
> #include<stdio.h>
> #include<linux/proc_fs.h>
> #include<sys/types.h>
> main()
> {
> const char* name="CPU";
> mode_t mode=444;
> struct proc_dir_entry *l;
> l=create_proc_entry(name,mode,NULL);
> }

Type off_t is defined in <sys/types.h> as well as <linux/types.h>
and since proc_fs.h needs off_t, you need to include the correct
headers prior to including proc_fs.h. That could be a starting
point.

- -- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE++uEa0iMVcrivHFQRAn00AJ4qgh/P1X2SKQDUWUKV6v4qAuiOhgCfce+m
ch83VxaoG8C7kET0NwYFJ5g=
=pOLd
-----END PGP SIGNATURE-----


-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to