Switch to C99.
This commit is contained in:
parent
2f4cb2d411
commit
9db9305366
|
@ -5,9 +5,9 @@ AM_CONFIG_HEADER(config.h)
|
|||
AM_INIT_AUTOMAKE
|
||||
|
||||
# Checks for programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_CC_C99
|
||||
|
||||
# Set language to C++
|
||||
# Set language to C
|
||||
AC_LANG_C
|
||||
|
||||
# Checks for header files
|
||||
|
@ -33,6 +33,8 @@ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
|||
AC_FUNC_UTIME_NULL
|
||||
AC_CHECK_FUNCS([fchdir fdatasync fork ftruncate lchown memset mkdir mkfifo rmdir setxattr strdup strerror utime])
|
||||
|
||||
AC_SUBST([EXTRA_CFLAGS], ["-Wall -Werror -Wextra"])
|
||||
|
||||
AC_CONFIG_FILES([Makefile
|
||||
src/Makefile
|
||||
])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
INCLUDES = $(FUSE_CFLAGS)
|
||||
INCLUDES = $(FUSE_CFLAGS) $(EXTRA_CFLAGS)
|
||||
|
||||
bin_PROGRAMS=pifs
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/statvfs.h>
|
||||
#include <sys/xattr.h>
|
||||
#include <unistd.h>
|
||||
#include <config.h>
|
||||
#include <fuse/fuse.h>
|
||||
|
||||
|
@ -151,7 +154,7 @@ static int pifs_write(const char *path, const char *buf, size_t count,
|
|||
static int pifs_statfs(const char *path, struct statvfs *buf)
|
||||
{
|
||||
FULL_PATH(path);
|
||||
int ret = statfs(full_path, buf);
|
||||
int ret = statvfs(full_path, buf);
|
||||
return ret == -1 ? -errno : ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue