From abe5e4d573a41eb556ed6342bf1e8b3a4a041cd4 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <campbell@mumble.net>
Date: Fri, 23 Jul 2010 18:33:32 +0000
Subject: [PATCH] Use _init and etext on NetBSD to find the text segment's
 bounds.

---
 src/microcode/uxtrap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/microcode/uxtrap.h b/src/microcode/uxtrap.h
index 51f820829..ed6a3ef5e 100644
--- a/src/microcode/uxtrap.h
+++ b/src/microcode/uxtrap.h
@@ -795,7 +795,7 @@ typedef struct
    extern int _etext;
 #endif
 
-#ifdef __linux__
+#if defined(__linux__) || defined(__NetBSD__)
    extern unsigned int _init;
    extern unsigned int etext;
 #  define ADDRESS_UCODE_P(addr)						\
-- 
2.25.1