Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jonm
Created October 3, 2015 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonm/838baf534734cdd4f321 to your computer and use it in GitHub Desktop.
Save jonm/838baf534734cdd4f321 to your computer and use it in GitHub Desktop.
we are calling bind() with the wrong number of arguments
$ make
gcc -g -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -DIMPL_SECURITY -DNEW_RENT -DLEVEL_LOSS -DNEWEXP -DGROUP_NAMES -c -o comm.o comm.c
...
comm.c:747:31: error: too many arguments to function call, expected 3, have 4
if (bind(s, &sa, sizeof(sa), 0) < 0) {
~~~~ ^
/usr/include/sys/socket.h:557:1: note: 'bind' declared here
int bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind);
^
...
25 warnings and 2 errors generated.
make: *** [comm.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment