From: Alan T. DeKok Date: Tue, 22 Jun 2010 14:41:13 +0000 (+0200) Subject: Build on systems without fcntl X-Git-Tag: release_3_0_0_beta0~1402 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=9a6cc261bded8c01a4283436487b628f06ef8ac7;p=freeradius.git Build on systems without fcntl --- diff --git a/src/modules/rlm_sql_log/rlm_sql_log.c b/src/modules/rlm_sql_log/rlm_sql_log.c index e27070a..2e6f72e 100644 --- a/src/modules/rlm_sql_log/rlm_sql_log.c +++ b/src/modules/rlm_sql_log/rlm_sql_log.c @@ -339,6 +339,7 @@ static int sql_xlat_query(rlm_sql_log_t *inst, REQUEST *request, const char *que */ static int setlock(int fd) { +#ifdef F_WRLCK struct flock fl; memset(&fl, 0, sizeof(fl)); fl.l_start = 0; @@ -346,6 +347,9 @@ static int setlock(int fd) fl.l_type = F_WRLCK; fl.l_whence = SEEK_SET; return fcntl(fd, F_SETLKW, &fl); +#else + return -1; +#endif } /*