summaryrefslogtreecommitdiffstats
path: root/lib/libc/hidden/float.h
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2016-09-06 19:56:36 +0000
committerguenther <guenther@openbsd.org>2016-09-06 19:56:36 +0000
commit02cde8906b0cb388f39a2c3520f1da593b271c22 (patch)
treebeddaf9be276a42f920b2eec58c621fcdc56f102 /lib/libc/hidden/float.h
parentzap bha, hiding outside dev/ tree (diff)
downloadwireguard-openbsd-02cde8906b0cb388f39a2c3520f1da593b271c22.tar.xz
wireguard-openbsd-02cde8906b0cb388f39a2c3520f1da593b271c22.zip
Make sure attributes are applied to function declarations before they're
used or defined, as clang isn't as forgiving as gcc. Also, declare __flt_rounds() so that libc can build it despire clang providing its own <float.h> ok stefan@ kettenis@
Diffstat (limited to 'lib/libc/hidden/float.h')
-rw-r--r--lib/libc/hidden/float.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/libc/hidden/float.h b/lib/libc/hidden/float.h
index ea2cf5bae9a..82d2aca3445 100644
--- a/lib/libc/hidden/float.h
+++ b/lib/libc/hidden/float.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: float.h,v 1.1 2015/10/27 05:54:49 guenther Exp $ */
+/* $OpenBSD: float.h,v 1.2 2016/09/06 19:56:36 guenther Exp $ */
/*
* Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
*
@@ -20,6 +20,11 @@
#include_next <float.h>
+/*
+ * clang overrides our <float.h>, but libc still need to define __flt_rounds()
+ * to support building with gcc
+ */
+int __flt_rounds(void);
PROTO_NORMAL(__flt_rounds);
#endif /* _LIBC_FLOAT_H_ */