#define _REDIS_FMACRO_H
#define _BSD_SOURCE
-#define _XOPEN_SOURCE
+#define _XOPEN_SOURCE 700
#define _LARGEFILE_SOURCE
#define _FILE_OFFSET_BITS 64
#include <string.h>
#include <time.h>
#include <unistd.h>
-#define __USE_POSIX199309
-#define __USE_UNIX98
#include <signal.h>
#ifdef HAVE_BACKTRACE
static void setGenericCommand(redisClient *c, int nx, robj *key, robj *val, robj *expire) {
int retval;
- long seconds;
+ long seconds = 0; /* initialized to avoid an harmness warning */
if (expire) {
if (getLongFromObjectOrReply(c, expire, &seconds, NULL) != REDIS_OK)
(server.appendfsync == APPENDFSYNC_EVERYSEC &&
now-server.lastfsync > 1))
{
- fsync(server.appendfd); /* Let's try to get this data on the disk */
+ /* aof_fsync is defined as fdatasync() for Linux in order to avoid
+ * flushing metadata. */
+ aof_fsync(server.appendfd); /* Let's try to get this data on the disk */
server.lastfsync = now;
}
}