]> git.ozlabs.org Git - petitboot/blobdiff - ui/twin/pbt-scr.c
ncurses/nc-cui: musl libc fixes
[petitboot] / ui / twin / pbt-scr.c
index 79f6792e346d33d1ff6c786fffd11a400aa9cd0e..e10cab10e9c9b817d8ae06a5c6a9da27b6c8fac7 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#if defined(HAVE_CONFIG_H)
 #include "config.h"
-#define _GNU_SOURCE
+#endif
+
 #include <assert.h>
 
 #include <string.h>
@@ -400,8 +402,8 @@ struct pbt_scr *pbt_scr_init(void *talloc_ctx,
 #if !defined(HAVE_LIBTWIN_TWIN_X11_H)
                assert(0);
 #else
-               scr->twin_ctx.x11 = twin_x11_create_ext(XOpenDisplay(0), width,
-                       height, 0);
+               scr->twin_ctx.x11 = twin_x11_create_ext(XOpenDisplay(NULL),
+                       width, height, 0);
 
                if (!scr->twin_ctx.x11) {
                        pb_log("%s: twin_x11_create_ext failed.\n", __func__);