Skip Menu |
 

Date: Sun, 4 Oct 2015 22:45:21 +0200
Subject: unsetenv() returns void
From: Thomas Bernard <thomas.bernard@cls.to>
To: krb5-bugs@mit.edu
Hello,

I've been trying to build krb5 1.13.2 on my old G4 Power Mac (PPC)
with OS X 10.4.11
I've got the following error in clients/ksu/main.c :
main.c: In function "get_configured_defccname":
main.c:818: error: void value not ignored as it ought to be
*** [main.o] Error 1

indeed, unsetenv() returns void (OS X 10.4) :
man 3 unsetenv
...
void
unsetenv(const char *name);
...
HISTORY
The functions setenv() and unsetenv() appeared in Version 7 AT&T UNIX.

Show quoted text
>From a recent linux man :
Prior to glibc 2.2.2, unsetenv() was prototyped as returning void;
more recent glibc versions follow the POSIX.1-2001-compliant prototype
shown in the SYNOPSIS.


regards,
--


Thomas Bernard - thomas.bernard@cls.to
Conseil Logiciel Securite SAS
1 Passage du Surmelin
75020 Paris
Download void_unsetenv_PPC_Tiger_.patch
application/octet-stream 596B

Message body not shown because it is not plain text.

ksu also contains a compatibility definition of unsetenv() which
returns void. We should change the use in get_configured_defccname()
to not use the return value.
From: ghudson@mit.edu
Subject: git commit

Make ksu work when unsetenv() returns NULL

Some older platforms (OS X 10.4, glibc 2.2.1) declare unsetenv() as
returning void, as does ksu's compatibility definition of unsetenv().
Don't use the return value in get_configured_defccname().

https://github.com/krb5/krb5/commit/7eee546db10e907666e02fdded4f512e8d0faf4c
Author: Greg Hudson <ghudson@mit.edu>
Commit: 7eee546db10e907666e02fdded4f512e8d0faf4c
Branch: master
src/clients/ksu/main.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
From: tlyu@mit.edu
Subject: git commit

Make ksu work when unsetenv() returns NULL

Some older platforms (OS X 10.4, glibc 2.2.1) declare unsetenv() as
returning void, as does ksu's compatibility definition of unsetenv().
Don't use the return value in get_configured_defccname().

(cherry picked from commit 7eee546db10e907666e02fdded4f512e8d0faf4c)

https://github.com/krb5/krb5/commit/83ef046b405dfad26538eeccc117e1ab178bdd91
Author: Greg Hudson <ghudson@mit.edu>
Committer: Tom Yu <tlyu@mit.edu>
Commit: 83ef046b405dfad26538eeccc117e1ab178bdd91
Branch: krb5-1.14
src/clients/ksu/main.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)