diff options
author | Werner Koch <[email protected]> | 2021-10-27 10:55:03 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2021-10-27 10:55:03 +0000 |
commit | 50e43af3f1081ba3fe677b1030c5c62063461665 (patch) | |
tree | ad9d34ce1108db368c7d5f0fde12c77bc6db0291 | |
parent | gpg: Fix printing of binary notations. (diff) | |
download | gnupg-50e43af3f1081ba3fe677b1030c5c62063461665.tar.gz gnupg-50e43af3f1081ba3fe677b1030c5c62063461665.zip |
common: Support MYPROC_SELF_EXE for Solaris
* common/homedir.c (MYPROC_SELF_EXE): Add case for SunOS.
--
GnuPG-bug-id: 5671
-rw-r--r-- | common/homedir.c | 2 | ||||
-rw-r--r-- | common/init.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/common/homedir.c b/common/homedir.c index 2877101e3..e1b55f296 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -70,6 +70,8 @@ # define MYPROC_SELF_EXE "/proc/self/exe" #elif defined(__NetBSD__) # define MYPROC_SELF_EXE "/proc/curproc/exe" +#elif defined(__illumos__) || defined(__sun) +# define MYPROC_SELF_EXE "/proc/self/path/a.out" #else /* Assume other BSDs */ # define MYPROC_SELF_EXE "/proc/curproc/file" #endif diff --git a/common/init.c b/common/init.c index 7d4119268..b9f05f359 100644 --- a/common/init.c +++ b/common/init.c @@ -210,7 +210,7 @@ _init_common_subsystems (gpg_err_source_t errsource, int *argcp, char ***argvp) { /* Don't show the error if the program does not have a console. * This is for example the case for daemons. */ - in rc = GetLastError (); + int rc = GetLastError (); if (rc != ERROR_INVALID_HANDLE) { log_info ("SetConsoleCP failed: %s\n", w32_strerror (rc)); |