gcc не компилит
Добавлено: 06 авг 2004, 16:16
привет.
поставил
alt linux junior2.2 затем компилятор gcc
попробывал собрать следующее
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
#include <netinet/ip.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netinet/in_systm.h>
int main () {
struct ip *iph;
struct tcphdr *tcph;
iph->ip_tos=0;
tcph->th_dport = htons (80);
printf("Hello!\n");
return 0;
}
получил
[root@localhost /]# gcc -o spu helo.c
helo.c: In function `main':
helo.c:14: structure has no member named `th_dport'
подскажите решение pliz.
поставил
alt linux junior2.2 затем компилятор gcc
попробывал собрать следующее
#include <sys/types.h>
#include <stdio.h>
#include <errno.h>
#include <netinet/ip.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <arpa/inet.h>
#include <netinet/in_systm.h>
int main () {
struct ip *iph;
struct tcphdr *tcph;
iph->ip_tos=0;
tcph->th_dport = htons (80);
printf("Hello!\n");
return 0;
}
получил
[root@localhost /]# gcc -o spu helo.c
helo.c: In function `main':
helo.c:14: structure has no member named `th_dport'
подскажите решение pliz.