I am making a call to flock() and getting the error
" warning: passing arg 1 of `flock' makes integer from pointer without a cast"
when I try to compile. I am running FreeBSD and using gcc.

Code:
  flock(logfile,LOCK_EX);/*lock log file*/
  fputs("client logged in",logfile);
  flock(logfile,LOCK_UN);/*unlock log file*/
logfile is declared like this
Code:
FILE *logfile;
this is my first time every using flock(), it seems like it would be much easier than using POSIX semaphores. Does anyone know why I am getting this error? The fputs() call does not give me any errors at compile time.

thanks in advance