2017-06-25 09:35 BST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002468NetSurfFramebuffer-specificpublic2017-04-23 10:32
ReporterAnthony J. Bentley 
Assigned ToVincent Sanders 
SeverityminorReproducibilityalways 
StatusassignedResolutionopen 
PlatformOSOpenBSDOS Version
Product Version3.7 
Target VersionFixed in Version 
Summary0002468: Patch to build netsurf-fb on OpenBSD
DescriptionThe attached patch allows netsurf-fb to build on OpenBSD.

Issue #1: strndup is not detected properly, and combining _BSD_SOURCE/_DEFAULT_SOURCE/_XOPEN_SOURCE with _POSIX_C_SOURCE with an up-to-date _POSIX_C_SOURCE=200809L leads to an implicit strndup declaration resulting in a runtime crash.

Issue 0000002: POSIX doesn't specify a -v flag for cp, and OpenBSD doesn't implement it.
TagsNo tags attached.
Fixed in CI build #
Reported in CI build #
URL of problem page
Attached Files
  • diff file icon netsurf-fb.diff (1,378 bytes) 2016-09-12 07:32 -
    diff --git a/frontends/framebuffer/Makefile b/frontends/framebuffer/Makefile
    index 15888ae..2682d6f 100644
    --- a/frontends/framebuffer/Makefile
    +++ b/frontends/framebuffer/Makefile
    @@ -21,10 +21,7 @@ CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FONT_CURSIVE)"'
     CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
     
     CFLAGS += -std=c99 -g -Dsmall \
    -	  -D_BSD_SOURCE \
    -	  -D_DEFAULT_SOURCE \
    -	  -D_XOPEN_SOURCE=600 \
    -	  -D_POSIX_C_SOURCE=200112L
    +	  -D_POSIX_C_SOURCE=200809L
     
     LDFLAGS += -lm
     
    @@ -173,8 +170,8 @@ NETSURF_FRAMEBUFFER_RESOURCE_LIST := adblock.css credits.html	\
     install-framebuffer:
     	$(Q)mkdir -p $(DESTDIR)$(NETSURF_FRAMEBUFFER_BIN)
     	$(Q)mkdir -p $(DESTDIR)$(NETSURF_FRAMEBUFFER_RESOURCES)
    -	$(Q)cp -v $(EXETARGET) $(DESTDIR)/$(NETSURF_FRAMEBUFFER_BIN)netsurf$(SUBTARGET)
    -	$(Q)for F in $(NETSURF_FRAMEBUFFER_RESOURCE_LIST); do cp -vL framebuffer/res/$$F $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES); done
    +	$(Q)cp $(EXETARGET) $(DESTDIR)/$(NETSURF_FRAMEBUFFER_BIN)netsurf$(SUBTARGET)
    +	$(Q)for F in $(NETSURF_FRAMEBUFFER_RESOURCE_LIST); do cp -L framebuffer/res/$$F $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES); done
     	$(Q)$(SPLIT_MESSAGES) -l en -p fb -f messages resources/FatMessages | gzip -9n > $(DESTDIR)$(NETSURF_FRAMEBUFFER_RESOURCES)messages
     
     # ----------------------------------------------------------------------------
    
    diff file icon netsurf-fb.diff (1,378 bytes) 2016-09-12 07:32 +
  • ? file icon patch-frontends_framebuffer_Makefile (1,357 bytes) 2017-02-07 08:28 -
    $OpenBSD: patch-frontends_framebuffer_Makefile,v 1.1 2016/11/30 07:35:00 bentley Exp $
    --- frontends/framebuffer/Makefile.orig	Sat Nov 19 06:37:41 2016
    +++ frontends/framebuffer/Makefile	Mon Nov 21 02:23:58 2016
    @@ -21,9 +21,6 @@ CFLAGS += '-DNETSURF_FB_FONT_CURSIVE="$(NETSURF_FB_FON
     CFLAGS += '-DNETSURF_FB_FONT_FANTASY="$(NETSURF_FB_FONT_FANTASY)"'
     
     CFLAGS += -std=c99 -g -Dsmall \
    -	  -D_BSD_SOURCE \
    -	  -D_DEFAULT_SOURCE \
    -	  -D_XOPEN_SOURCE=600 \
     	  -D_POSIX_C_SOURCE=200809L
     
     LDFLAGS += -lm
    @@ -173,8 +170,8 @@ NETSURF_FRAMEBUFFER_RESOURCE_LIST := adblock.css credi
     install-framebuffer:
     	$(Q)mkdir -p $(DESTDIR)$(NETSURF_FRAMEBUFFER_BIN)
     	$(Q)mkdir -p $(DESTDIR)$(NETSURF_FRAMEBUFFER_RESOURCES)
    -	$(Q)cp -v $(EXETARGET) $(DESTDIR)/$(NETSURF_FRAMEBUFFER_BIN)netsurf-fb
    -	$(Q)for F in $(NETSURF_FRAMEBUFFER_RESOURCE_LIST); do cp -vL $(FRONTEND_RESOURCES_DIR)/$$F $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES); done
    +	$(Q)cp $(EXETARGET) $(DESTDIR)/$(NETSURF_FRAMEBUFFER_BIN)netsurf-fb
    +	$(Q)for F in $(NETSURF_FRAMEBUFFER_RESOURCE_LIST); do cp -L $(FRONTEND_RESOURCES_DIR)/$$F $(DESTDIR)/$(NETSURF_FRAMEBUFFER_RESOURCES); done
     	$(Q)$(SPLIT_MESSAGES) -l en -p fb -f messages resources/FatMessages | gzip -9n > $(DESTDIR)$(NETSURF_FRAMEBUFFER_RESOURCES)messages
     
     # ----------------------------------------------------------------------------
    
    ? file icon patch-frontends_framebuffer_Makefile (1,357 bytes) 2017-02-07 08:28 +

-Relationships
+Relationships

-Notes
Vincent Sanders

~0001471

Vincent Sanders (administrator)

did i apply this (or equivalent) already for 3.6?
Anthony J. Bentley

~0001515

Anthony J. Bentley (reporter)

It hasn't been fixed for 3.6. I've attached the patch I use against 3.6.
+Notes

-Issue History
Date Modified Username Field Change
2016-09-12 07:32 Anthony J. Bentley New Issue
2016-09-12 07:32 Anthony J. Bentley File Added: netsurf-fb.diff
2016-12-31 12:44 Vincent Sanders Note Added: 0001471
2016-12-31 12:44 Vincent Sanders Status new => feedback
2017-02-07 08:28 Anthony J. Bentley File Added: patch-frontends_framebuffer_Makefile
2017-02-07 08:29 Anthony J. Bentley Note Added: 0001515
2017-02-07 08:29 Anthony J. Bentley Status feedback => new
2017-04-23 10:32 Vincent Sanders Assigned To => Vincent Sanders
2017-04-23 10:32 Vincent Sanders Status new => assigned
2017-04-23 10:32 Vincent Sanders Product Version => 3.7
+Issue History