groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 04/07: [libgroff]: Fix underspecified getenv() prototype.


From: G. Branden Robinson
Subject: [groff] 04/07: [libgroff]: Fix underspecified getenv() prototype.
Date: Thu, 25 Jan 2024 15:49:55 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit e49b934b77a76443005f92a737dae7370b50e5f7
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Tue Jan 23 19:39:03 2024 -0600

    [libgroff]: Fix underspecified getenv() prototype.
    
    * src/libs/libgroff/getopt.c: Do it.  Seen when building groff on a
      non-glibc-based system (clang 17 complains).
---
 ChangeLog                  | 7 +++++++
 src/libs/libgroff/getopt.c | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 9a281a5b1..76744a3c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-01-23  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [libgroff]: Fix underspecified `getenv()` prototype.
+
+       * src/libs/libgroff/getopt.c: Do it.  Seen when building groff
+         on a non-glibc-based system (clang 17 complains).
+
 2024-01-22  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * doc/doc.am (doc/webpage.ms): Register dependency on
diff --git a/src/libs/libgroff/getopt.c b/src/libs/libgroff/getopt.c
index 6d4ee5b3a..77f8da1ed 100644
--- a/src/libs/libgroff/getopt.c
+++ b/src/libs/libgroff/getopt.c
@@ -124,7 +124,7 @@ static struct _getopt_data getopt_data;
    whose names are inconsistent.  */
 
 #ifndef getenv
-extern char *getenv ();
+extern char *getenv (const char *);
 #endif
 
 #endif /* not __GNU_LIBRARY__ */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]