aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man3/stpcpy.34
1 files changed, 4 insertions, 0 deletions
diff --git a/man3/stpcpy.3 b/man3/stpcpy.3
index 40f28e6f9a..8a3071ab09 100644
--- a/man3/stpcpy.3
+++ b/man3/stpcpy.3
@@ -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);