git: c6f1867664d5 - main - net/hostapd-devel: Make use of fdatasync(2)

Cy Schubert cy at FreeBSD.org
Mon Jun 14 16:04:17 UTC 2021


The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c6f1867664d5ee44132e12d8ec53412b35754248

commit c6f1867664d5ee44132e12d8ec53412b35754248
Author:     Cy Schubert <cy at FreeBSD.org>
AuthorDate: 2021-06-09 21:00:44 +0000
Commit:     Cy Schubert <cy at FreeBSD.org>
CommitDate: 2021-06-14 16:03:59 +0000

    net/hostapd-devel: Make use of fdatasync(2)
    
    FreeBSD has supported fdatasync(2) since FreeBSD 11.1. Prepare for
    future use when syncing to planned updates to base.
---
 net/hostapd-devel/files/patch-src_utils_os__unix.c | 26 +++++++++-------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/net/hostapd-devel/files/patch-src_utils_os__unix.c b/net/hostapd-devel/files/patch-src_utils_os__unix.c
index c56eee136a44..cd4f24b681c3 100644
--- a/net/hostapd-devel/files/patch-src_utils_os__unix.c
+++ b/net/hostapd-devel/files/patch-src_utils_os__unix.c
@@ -1,18 +1,14 @@
---- src/utils/os_unix.c.orig	2015-09-27 19:02:05 UTC
-+++ src/utils/os_unix.c
-@@ -442,6 +442,7 @@ int os_file_exists(const char *fname)
- }
- 
- 
-+#if !defined __FreeBSD__ && !defined __DragonFly__
+--- src/utils/os_unix.c.orig	2021-06-02 14:11:18.000000000 -0700
++++ src/utils/os_unix.c	2021-06-07 16:07:39.152547000 -0700
+@@ -464,9 +464,9 @@
  int os_fdatasync(FILE *stream)
  {
  	if (!fflush(stream)) {
-@@ -459,6 +460,7 @@ int os_fdatasync(FILE *stream)
- 
- 	return -1;
- }
-+#endif
- 
- 
- #ifndef WPA_TRACE
+-#ifdef __linux__
++#if defined __FreeBSD__ || defined __linux__
+ 		return fdatasync(fileno(stream));
+-#else /* !__linux__ */
++#else /* !__linux__ && !__FreeBSD__ */
+ #ifdef F_FULLFSYNC
+ 		/* OS X does not implement fdatasync(). */
+ 		return fcntl(fileno(stream), F_FULLFSYNC);


More information about the dev-commits-ports-main mailing list