Hi, I added simply #define _XOPEN_SOURCE_EXTENDED to the top of probe code like this.
-- SASANO Takayoshi (JG1UAA) <u...@mx5.nisiq.net> Index: Makefile =================================================================== RCS file: /cvs/ports/emulators/qemu/Makefile,v retrieving revision 1.160 diff -u -r1.160 Makefile --- Makefile 23 Apr 2017 13:24:17 -0000 1.160 +++ Makefile 4 May 2017 21:45:34 -0000 @@ -7,6 +7,7 @@ COMMENT= multi system emulator DISTNAME= qemu-2.9.0 +REVISION= 1 CATEGORIES= emulators MASTER_SITES= http://wiki.qemu.org/download/ EXTRACT_SUFX= .tar.bz2 @@ -78,6 +79,7 @@ --host-cc="${CC}" \ --extra-cflags="${EXTRA_CFLAGS}" \ --extra-ldflags="${EXTRA_LDFLAGS}" \ + --enable-curses \ --disable-bsd-user \ --disable-gcrypt \ --disable-smartcard \ Index: patches/patch-configure =================================================================== RCS file: /cvs/ports/emulators/qemu/patches/patch-configure,v retrieving revision 1.51 diff -u -r1.51 patch-configure --- patches/patch-configure 23 Apr 2017 13:24:17 -0000 1.51 +++ patches/patch-configure 4 May 2017 21:45:34 -0000 @@ -1,7 +1,15 @@ $OpenBSD: patch-configure,v 1.51 2017/04/23 13:24:17 ajacoutot Exp $ ---- configure.orig Tue Apr 11 14:00:36 2017 -+++ configure Tue Apr 11 21:38:09 2017 -@@ -4787,10 +4787,6 @@ fi +--- configure.orig Thu Apr 20 23:57:00 2017 ++++ configure Fri May 5 05:51:39 2017 +@@ -2985,6 +2985,7 @@ if test "$curses" != "no" ; then + fi + curses_found=no + cat > $TMPC << EOF ++#define _XOPEN_SOURCE_EXTENDED + #include <locale.h> + #include <curses.h> + #include <wchar.h> +@@ -4787,10 +4788,6 @@ fi if test "$gcov" = "yes" ; then CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" @@ -12,7 +20,7 @@ fi ########################################## -@@ -4939,7 +4935,7 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a +@@ -4939,7 +4936,7 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a # Different host OS linkers have different ideas about the name of the ELF # emulation. Linux and OpenBSD use 'elf_i386'; FreeBSD uses the _fbsd # variant; and Windows uses i386pe.