From owner-dev-commits-ports-main@freebsd.org Mon Jun 14 16:04:17 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A64C64A3A0; Mon, 14 Jun 2021 16:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4G3bqP02FLz3hRb; Mon, 14 Jun 2021 16:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD6A517951; Mon, 14 Jun 2021 16:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15EG4GGs015745; Mon, 14 Jun 2021 16:04:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15EG4GRj015744; Mon, 14 Jun 2021 16:04:16 GMT (envelope-from git) Date: Mon, 14 Jun 2021 16:04:16 GMT Message-Id: <202106141604.15EG4GRj015744@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Cy Schubert Subject: git: c6f1867664d5 - main - net/hostapd-devel: Make use of fdatasync(2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6f1867664d5ee44132e12d8ec53412b35754248 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jun 2021 16:04:17 -0000 The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/ports/commit/?id=c6f1867664d5ee44132e12d8ec53412b35754248 commit c6f1867664d5ee44132e12d8ec53412b35754248 Author: Cy Schubert AuthorDate: 2021-06-09 21:00:44 +0000 Commit: Cy Schubert 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);