Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Jan 2024 17:21:50 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 81ea920435b4 - main - pflowclt: fix gcc build error
Message-ID:  <202401161721.40GHLoH9036706@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=81ea920435b4980683a0329cc43060fc060cf479

commit 81ea920435b4980683a0329cc43060fc060cf479
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-01-16 16:29:12 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-01-16 17:18:09 +0000

    pflowclt: fix gcc build error
    
    gcc is unhappy with the nested extern declaration of __progname, so move
    it out of the usage() function.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sbin/pflowctl/pflowctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sbin/pflowctl/pflowctl.c b/sbin/pflowctl/pflowctl.c
index 7be85d8b6ad4..35daedfdf478 100644
--- a/sbin/pflowctl/pflowctl.c
+++ b/sbin/pflowctl/pflowctl.c
@@ -47,11 +47,11 @@
 
 static int get(int id);
 
+extern char *__progname;
+
 static void
 usage(void)
 {
-	extern char *__progname;
-
 	fprintf(stderr,
 "usage: %s [-la] [-d id]\n",
 	    __progname);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202401161721.40GHLoH9036706>