patch 9.1.0842: not checking for the sync() systemcall

Problem:  not checking for the sync() systemcall
Solution: check for sync in configure script, fix related #ifdefs
          (Jonas Termansen)

It's better to check for features directly rather than maintaining a
denylist of operating systems without them.

closes: #15985

Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/configure.ac b/src/configure.ac
index 24479d3..56895f6 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -3769,7 +3769,7 @@
 	sigprocmask sigvec strcasecmp strcoll strerror strftime stricmp strncasecmp \
 	strnicmp strpbrk strptime strtol tgetent towlower towupper iswupper \
 	tzset usleep utime utimes mblen ftruncate unsetenv posix_openpt \
-	clock_gettime)
+	clock_gettime sync)
 AC_FUNC_SELECT_ARGTYPES
 AC_FUNC_FSEEKO