diff --git a/lib/replace/replace.h b/lib/replace/replace.h index c081f23c266..c47cf1c1b10 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -802,4 +802,15 @@ int fdatasync(int ); /* prototype is in "system/network.h" */ #endif +#if !defined(getpass) +#ifdef REPLACE_GETPASS +#if defined(REPLACE_GETPASS_BY_GETPASSPHRASE) +#define getpass(prompt) getpassphrase(prompt) +#else +#define getpass(prompt) rep_getpass(prompt) +char *rep_getpass(const char *prompt); +#endif +#endif +#endif + #endif /* _LIBREPLACE_REPLACE_H */ diff --git a/lib/replace/system/passwd.h b/lib/replace/system/passwd.h index f630012f000..223324c4b46 100644 --- a/lib/replace/system/passwd.h +++ b/lib/replace/system/passwd.h @@ -67,6 +67,7 @@ #include #endif +#if !defined(getpass) #ifdef REPLACE_GETPASS #if defined(REPLACE_GETPASS_BY_GETPASSPHRASE) #define getpass(prompt) getpassphrase(prompt) @@ -75,6 +76,7 @@ char *rep_getpass(const char *prompt); #endif #endif +#endif #ifndef NGROUPS_MAX #define NGROUPS_MAX 32 /* Guess... */