Sponsored Content
Top Forums Programming gcc 4.3.2 accept sys call warrning incompatible pointer type Post 302308656 by personificator on Monday 20th of April 2009 01:32:59 AM
Old 04-20-2009
gcc 4.3.2 accept sys call warrning incompatible pointer type

Hi all, this warning is driving me nuts. I use -pedantic with -Wall and -Werror so this needs to be fixed.
BUILD: GNU-Linux-x86

Any ideas?

struct sockaddr_in server_addr;
int addr_len = sizeof (server_addr);

fd = accept(link->socket_fd,
(struct sockaddr_in *) &server_addr,
(socklen_t *) &addr_len));

warning: passing argument 2 of ‘accept' from incompatible pointer type

Thanks for you comments.
 

10 More Discussions You Might Find Interesting

1. Programming

adv reqd on SIGCHLD on accept call

Hi, I have small problem. In my (concurrent)server programm, I am handling accept problem from client like this. sample of server code. /*******************/ end = 0; while (! end ) { sockfd = accept(...) if(sockfd == -1) { if (errno == EINTR) /* this is bcoz... (5 Replies)
Discussion started by: stevenjagan
5 Replies

2. Programming

Accesing structure member:Error:dereferencing pointer to incomplete type

$ gcc -Wall -Werror struct.c struct.c: In function `main': struct.c:18: error: dereferencing pointer to incomplete type $ cat struct.c #include <stdio.h> #include <stdlib.h> #include <string.h> /*Declaration of structure*/ struct human { char *first; char gender; int age; } man,... (3 Replies)
Discussion started by: amit4g
3 Replies

3. Programming

enable 64bit long type for gcc

hey, I believe I once saw a post in this forum, about enable an GCC option to enable long types. I simply cannot find it any more. Can anybody give me a hint? I am on 32bit Ubuntu, and I would like my int be really long. Also I need malloc() take long int argument too. I found it is necessary to... (6 Replies)
Discussion started by: patiobarbecue
6 Replies

4. UNIX for Dummies Questions & Answers

Why do I need to call make if I call gcc ?

Why do I need to call make if I call gcc ? I thought gcc already compiles the sources. thanks (1 Reply)
Discussion started by: aneuryzma
1 Replies

5. Programming

Dereferencing pointer to incomplete type

// Hello all, I am having this error "Dereferencing pointer to incomplete type " on these 2 lines: xpoint = my_point->x; ypoint = my_point->y; I am having no clue y this is happening. Any help would be greately appreciated!!!! #include<stdio.h> #include<string.h>... (2 Replies)
Discussion started by: mind@work
2 Replies

6. Programming

GCC - Incompatible Pointer Types

Hi guys, here is my code written in C and the compiler error message. int i; int (*a); for (i = 1;i <= 9;i++) a = (int *)malloc(sizeof(int) * 10);here is the error: incompatible types when assigning to type ‘int’ from type ‘int *’I want to make a two dimensional array. I... (2 Replies)
Discussion started by: majid.merkava
2 Replies

7. Programming

Compilation Error: dereferencing pointer to incomplete type

I am getting a dereferencing pointer to incomplete type error when i compile the following code on lines highlighted in red. Can anyone help me in identifying what is wrong in the code? #include<stdio.h> #include<stdlib.h> typedef struct{ int info; struct node* link ; } node; void... (3 Replies)
Discussion started by: sreeharshasn
3 Replies

8. Red Hat

Incompatible Level of gcc?

I'm compiling an application someone gave me. It uses XLC on a Power7, running Red Hat (4? 5?). It compiles and links, but I get the following message for every .o and .exe... xlc_r: 1501-274 (W) An incompatible level of gcc has been specified. I've tried googling on this error, and I'll I... (2 Replies)
Discussion started by: Harper21
2 Replies

9. Programming

Warning: pointer type mismatch

Hi all, I'm new programming in C, so I had the next message in my code: Dual.c:88:20: warning: pointer type mismatch in conditional expression : &clientSa.sin6.sin6.sin6_addr, Any help would be great #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include... (1 Reply)
Discussion started by: godna
1 Replies

10. Programming

Incompatible data type fpos_t in C

This is from a program I wrote over in 1998 that I am trying to compile on a linux machine: void write_line (FILE *fp, int rec_no, line_rec *arec) { fpos_t woffset; woffset = (rec_no - 1) * sizeof(line_rec); fsetpos(fp,&woffset); fwrite(arec,sizeof(line_rec),1,fp); }On the line... (2 Replies)
Discussion started by: wbport
2 Replies
VDE_OVER_NS(1)						      General Commands Manual						    VDE_OVER_NS(1)

NAME
vde_over_ns - Steganographic cable over NS protocol for Virtual Distributed Ethernet SYNOPSIS
vde_over_ns [-D] [-c server_address] [-s vde_plug] [-i ip.to.bi.nd] domain.name DESCRIPTION
A vde_over_ns allows to connect two remote vde_switches through steganographic NS query/response datagrams. e.g.: dpipe vde_plug /tmp/s1 = vde_over_ns tun.mydomain.vde binds to udp port 53 and listen for incoming steganographic NS queries (server mode). All the traffic to/from stdout/stdin is redirected to the client via ns responses. creates a wire between two vde_switches (with sockets /tmp/s1 and /tmp/s2 respectively). This cable looses 10% of the packets in each direction. The same vde_over_dns server can be created using: vde_over_ns -s /tmp/s1 tun.mydomain.vde The syntax is almost identical for the client mode, except that to have a vde_over_ns client connect to that server, the -c server option must be specified. OPTIONS
-s vdeplug If specified, the vde_over_ns will connect to the local vde socket vdeplug instead pf stdin/stdout, using the libvdeplug library. -D Detach console and send the process to background. -b ip.to.bind The NS server will bind only to the specified ip, instead of any ip. Only valid in server mode (without -c) -c server_addr If specified, client mode is enabled. Vde_over_ns will try to send NS requests to server_addr. If not specified, server mode is enabled by default. NOTICE
Virtual Distributed Ethernet is not related in any way with www.vde.com ("Verband der Elektrotechnik, Elektronik und Informationstechnik" i.e. the German "Association for Electrical, Electronic & Information Technologies"). SEE ALSO
vde_switch(1), vdeq(1). dpipe(1). unixterm(1). AUTHORS
VDE_OVER_NS is a tool by Daniele Lacamera <root@danielinux.net> VDE is a project by Renzo Davoli <renzo@cs.unibo.it> based on nstx, a steganographic ns client/server software by: Florian Heinz <sky@sysv.de> Julien Oster <frodo@sysv.de> Virtual Distributed Ethernet May 2, 2007 VDE_OVER_NS(1)
All times are GMT -4. The time now is 10:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy