summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_fsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_fsync.c')
-rw-r--r--lib/libpthread/thread/thr_fsync.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpthread/thread/thr_fsync.c b/lib/libpthread/thread/thr_fsync.c
index 0d88320..b90d896 100644
--- a/lib/libpthread/thread/thr_fsync.c
+++ b/lib/libpthread/thread/thr_fsync.c
@@ -32,24 +32,25 @@
* $FreeBSD$
*/
#include <unistd.h>
-#ifdef _THREAD_SAFE
#include <pthread.h>
#include "pthread_private.h"
+#pragma weak fsync=__fsync
+
int
_fsync(int fd)
{
int ret;
if ((ret = _FD_LOCK(fd, FD_RDWR, NULL)) == 0) {
- ret = _thread_sys_fsync(fd);
+ ret = __sys_fsync(fd);
_FD_UNLOCK(fd, FD_RDWR);
}
return (ret);
}
int
-fsync(int fd)
+__fsync(int fd)
{
int ret;
@@ -59,4 +60,3 @@ fsync(int fd)
return ret;
}
-#endif
OpenPOWER on IntegriCloud