Clean up some obsolete OpenBSD portability cruft.
Test: treehugger
Change-Id: Ic76a55cf28b862d51fa3f96549eb99e992e72954
diff --git a/libc/upstream-openbsd/android/include/openbsd-compat.h b/libc/upstream-openbsd/android/include/openbsd-compat.h
index 2c8c735..afd1077 100644
--- a/libc/upstream-openbsd/android/include/openbsd-compat.h
+++ b/libc/upstream-openbsd/android/include/openbsd-compat.h
@@ -14,34 +14,20 @@
* limitations under the License.
*/
-#ifndef _BIONIC_OPENBSD_COMPAT_H_included
-#define _BIONIC_OPENBSD_COMPAT_H_included
+#pragma once
#define _BSD_SOURCE
#include <sys/cdefs.h>
#include <stddef.h> // For size_t.
-// TODO: libandroid_support uses this file, so we need to wait for
-// <sys/random.h> to be in the NDK headers before we can lose this declaration.
-//#include <sys/random.h> // For getentropy.
-int getentropy(void*, size_t);
+#include <sys/random.h> // For getentropy.
#define __BEGIN_HIDDEN_DECLS _Pragma("GCC visibility push(hidden)")
#define __END_HIDDEN_DECLS _Pragma("GCC visibility pop")
extern const char* __progname;
-/* Redirect internal C library calls to the public function. */
-#define _err err
-#define _errx errx
-#define _verr verr
-#define _verrx verrx
-#define _vwarn vwarn
-#define _vwarnx vwarnx
-#define _warn warn
-#define _warnx warnx
-
/* Ignore all DEF_STRONG/DEF_WEAK in OpenBSD. */
#define DEF_STRONG(sym)
#define DEF_WEAK(sym)
@@ -82,5 +68,3 @@
__LIBC_HIDDEN__ extern char* __findenv(const char*, int, int*);
__LIBC_HIDDEN__ extern char* _mktemp(char*);
-
-#endif