# HG changeset patch # User Richard M. Stallman # Date 745312860 0 # Node ID e4a5c21eb3006ad1853e2b0b954f22bbba13ae87 # Parent 807ba8bcc309b3aa3292e49519b190f66d8fb033 (getpwuid): Declare it as in xrdb.c. (init_filelock): Don't use return value of strcpy. diff -r 807ba8bcc309 -r e4a5c21eb300 src/filelock.c --- a/src/filelock.c Sat Aug 14 07:20:08 1993 +0000 +++ b/src/filelock.c Sat Aug 14 07:21:00 1993 +0000 @@ -42,7 +42,9 @@ extern char *egetenv (); extern char *strcpy (); -#ifndef __386bsd__ +#if defined (__bsdi__) || defined (DECLARE_GETPWUID_WITH_UID_T) +extern struct passwd *getpwuid (uid_t); +#else extern struct passwd *getpwuid (); #endif @@ -437,8 +439,9 @@ /* Make sure it ends with a slash. */ if (lock_path[strlen (lock_path) - 1] != '/') { - lock_path = strcpy ((char *) xmalloc (strlen (lock_path) + 2), - lock_path); + char *new_path = (char *) xmalloc (strlen (lock_path) + 2); + strcpy (new_path, lock_path); + lock_path = new_path; strcat (lock_path, "/"); }