lkml.org 
[lkml]   [1998]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectWeird compilation problem with glibc system

Hi, there,

I'm facing a weird (and probably simple to solve for most of you) problem
with an application compilation. This application compiles fine in libc5
systems, but in glibc systems (such as the one I'm currently using, a
RedHat 5.0 system with kernel 2.0.35), I get these errors:

[root@kelly proc]# cc -o cylines cylines.c
In file included from /usr/include/linux/ufs_fs.h:18,
from /usr/include/linux/ufs_fs_i.h:16,
from /usr/include/linux/fs.h:248,
from /usr/include/linux/tty.h:19,
from cylines.c:29:
/usr/include/linux/time.h:30: warning: `FD_SET' redefined
/usr/include/sys/select.h:60: warning: this is the location of the
previous definition
/usr/include/linux/time.h:31: warning: `FD_CLR' redefined
/usr/include/sys/select.h:61: warning: this is the location of the
previous definition
/usr/include/linux/time.h:32: warning: `FD_ISSET' redefined
/usr/include/sys/select.h:62: warning: this is the location of the
previous definition
/usr/include/linux/time.h:33: warning: `FD_ZERO' redefined
/usr/include/sys/select.h:63: warning: this is the location of the
previous definition
/usr/include/linux/time.h:39: warning: `ITIMER_REAL' redefined
/usr/include/sys/time.h:84: warning: this is the location of the previous
definition
/usr/include/linux/time.h:40: warning: `ITIMER_VIRTUAL' redefined
/usr/include/sys/time.h:87: warning: this is the location of the previous
definition
(...)


The include section of the source code is as follows:


#define __KERNEL__
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/fcntl.h>
#include <utmp.h>
#include <string.h>
#include <strings.h>
#include <linux/ppp.h>
#include <linux/sockios.h>
#include <asm/termios.h>
#include <linux/tqueue.h>
#include <linux/cyclades.h>

#include <linux/tty.h>



If I comment out the tty.h declaration (which is the one indirectly
causing the redefinition problem) or if I undef __KERNEL__, the
redefinition problems go away, but then I lose the tty_struct definition,
which is essential for the application.

Does anyone know how to solve this problem ??

I didn't send the whole src code attached not to waste bandwidth, but if
someone needs it to get a clue, I can send it in pvt.

Thanks in advance for your help.

Regards,
Ivan Passos



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.032 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site