/* Copyright (c) 2002-2003 Timo Sirainen */
-#include "lib.h"
+#include "config.h"
+#undef HAVE_CONFIG_H
#ifdef PREAD_WRAPPERS
# define _XOPEN_SOURCE 500 /* Linux */
#endif
+#define IN_COMPAT_C
+#include "lib.h"
+
#include <stdio.h>
#include <ctype.h>
#include <unistd.h>
#endif
#ifdef PREAD_WRAPPERS
+
ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
{
return pread(fd, buf, count, offset);
#endif
#if !defined (HAVE_PREAD) || defined (PREAD_WRAPPERS)
-# define pread my_pread
-# define pwrite my_pwrite
+# ifndef IN_COMPAT_C
+# define pread my_pread
+# define pwrite my_pwrite
+# endif
ssize_t my_pread(int fd, void *buf, size_t count, off_t offset);
ssize_t my_pwrite(int fd, const void *buf, size_t count, off_t offset);
#endif