summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strrchr.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-05-15 22:29:37 +0000
committermillert <millert@openbsd.org>2015-05-15 22:29:37 +0000
commitcb39b41371628601fbe4c618205356d538b9d08a (patch)
tree4bfaa7404c3e1cc94071c2f40996135642757ced /lib/libc/string/strrchr.c
parentadd missing placeholder so that the "UNSIGNED PACKAGES: " line actually (diff)
downloadwireguard-openbsd-cb39b41371628601fbe4c618205356d538b9d08a.tar.xz
wireguard-openbsd-cb39b41371628601fbe4c618205356d538b9d08a.zip
Make index/rindex weak aliases of strchr/strrchr since they are not
part of the ISO C standard and have also been dropped from POSIX. OK guenther@ kettenis@
Diffstat (limited to 'lib/libc/string/strrchr.c')
-rw-r--r--lib/libc/string/strrchr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/string/strrchr.c b/lib/libc/string/strrchr.c
index b2f17fba287..181f56ea698 100644
--- a/lib/libc/string/strrchr.c
+++ b/lib/libc/string/strrchr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strrchr.c,v 1.1 2014/11/30 19:43:57 deraadt Exp $ */
+/* $OpenBSD: strrchr.c,v 1.2 2015/05/15 22:29:37 millert Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -30,6 +30,8 @@
#include <string.h>
+__weak_alias(rindex, strrchr);
+
char *
strrchr(const char *p, int ch)
{