diff options
author | 2015-09-12 16:40:50 +0000 | |
---|---|---|
committer | 2015-09-12 16:40:50 +0000 | |
commit | ea552afd670492984cf8580d618c0835ce8a55e8 (patch) | |
tree | 2a09e05db678d1f787773cbd5f92f1c0b1e961a2 | |
parent | drop useless .Li macros (diff) | |
download | wireguard-openbsd-ea552afd670492984cf8580d618c0835ce8a55e8.tar.xz wireguard-openbsd-ea552afd670492984cf8580d618c0835ce8a55e8.zip |
Wrap <fcntl.h> so that calls to flock() go direct and both it and
creat() are weak symbols
-rw-r--r-- | lib/libc/hidden/fcntl.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/libc/hidden/fcntl.h b/lib/libc/hidden/fcntl.h new file mode 100644 index 00000000000..583a6aeb3d1 --- /dev/null +++ b/lib/libc/hidden/fcntl.h @@ -0,0 +1,29 @@ +/* $OpenBSD: fcntl.h,v 1.1 2015/09/12 16:40:50 guenther Exp $ */ +/* + * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBC_FCNTL_H_ +#define _LIBC_FCNTL_H_ + +#include_next <fcntl.h> + +PROTO_DEPRECATED(creat); +/*PROTO_CANCEL(fcntl);*/ +PROTO_NORMAL(flock); +/*PROTO_CANCEL(open);*/ +/*PROTO_CANCEL(openat);*/ + +#endif /* !_LIBC_FCNTL_H_ */ |