summaryrefslogtreecommitdiff
path: root/libexec/ld.so/strdup.c
diff options
context:
space:
mode:
Diffstat (limited to 'libexec/ld.so/strdup.c')
-rw-r--r--libexec/ld.so/strdup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libexec/ld.so/strdup.c b/libexec/ld.so/strdup.c
index 55eade02f05..9be7fa17378 100644
--- a/libexec/ld.so/strdup.c
+++ b/libexec/ld.so/strdup.c
@@ -1,8 +1,8 @@
-/* $OpenBSD: strdup.c,v 1.5 2002/04/09 19:59:47 drahn Exp $ */
+/* $OpenBSD: strdup.c,v 1.6 2002/05/24 03:44:37 deraadt Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -36,12 +36,13 @@
#include <sys/types.h>
#include "archdep.h"
-void * _dl_malloc(int);
+void *_dl_malloc(int);
char *
_dl_strdup(const char *orig)
{
char *newstr;
+
newstr = _dl_malloc(_dl_strlen(orig)+1);
strcpy(newstr, orig);
return (newstr);