]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
stpcpy.3: Add missing pieces/fix various problems in example program
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 2 Feb 2009 21:25:32 +0000 (10:25 +1300)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 2 Feb 2009 22:43:32 +0000 (11:43 +1300)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man3/stpcpy.3

index 40f28e6f9aea593d533adb8de3b4a03e724fdaf8..8a3071ab094f9031bf62b6fbddaeeeee12c7a9bc 100644 (file)
@@ -59,12 +59,16 @@ to concatenate \fBfoo\fP and
 .in +4n
 .nf
 
+#define _GNU_SOURCE
 #include <string.h>
+#include <stdio.h>
 
 int
 main(void)
 {
+    char buffer[20];
     char *to = buffer;
+
     to = stpcpy(to, "foo");
     to = stpcpy(to, "bar");
     printf("%s\\n", buffer);