projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2e4d5f
)
Build on systems without fcntl
author
Alan T. DeKok
<aland@freeradius.org>
Tue, 22 Jun 2010 14:41:13 +0000
(16:41 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Mon, 28 Jun 2010 13:56:49 +0000
(15:56 +0200)
src/modules/rlm_sql_log/rlm_sql_log.c
patch
|
blob
|
history
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
(file)
--- 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
}
/*