0

I have following problem:

warning: implicit declaration of function ‘sendto’

on line in variable outputCounterByte:

outputCounterByte += sendto(server_socket, outputBuff, offSet, 0, (struct sockaddr*) remote_addr, server_addr_len);

I don't understand this, where is a problem? OutputCouterByte is on value 0, and other variables are defined. I have included all headers(prototype of function). In other functions it is working.

Karthikeyan.R.S
  • 3,991
  • 1
  • 19
  • 31
  • 1
    `I have included all headers`..don't be so sure about that. :-) – Sourav Ghosh Dec 23 '14 at 12:57
  • possible duplicate of [warning: incompatible implicit declaration of built-in function ‘xyz’](http://stackoverflow.com/questions/977233/warning-incompatible-implicit-declaration-of-built-in-function-xyz) – Sourav Ghosh Dec 23 '14 at 13:06

1 Answers1

1

You need to include

#include <sys/types.h>
#include <sys/socket.h>

to provide the function prototype.

Iharob Al Asimi
  • 52,653
  • 6
  • 59
  • 97