Bug 223288

Summary: www/lighttpd: fix build without IPV6
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Guido Falsi <madpilot>
Status: Closed FIXED    
Severity: Affects Only Me CC: edgeman, madpilot
Priority: --- Flags: pkubaj: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
patch none

Description Piotr Kubaj freebsd_committer 2017-10-28 15:01:39 UTC
Created attachment 187538 [details]

This patch fixes the build with IPV6 disabled.

It's already upstream:

Tested on 11.1-STABLE.
Comment 1 commit-hook freebsd_committer 2017-10-28 16:01:25 UTC
A commit references this bug:

Author: madpilot
Date: Sat Oct 28 16:00:57 UTC 2017
New revision: 453061
URL: https://svnweb.freebsd.org/changeset/ports/453061

  Fix runtime problem when lighttpd is built with IPV6 option turned

  PR:		223288
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
  Obtained from:	https://redmine.lighttpd.net/issues/2832

Comment 2 Guido Falsi freebsd_committer 2017-10-28 16:01:50 UTC
Committed. Thanks!
Comment 3 Piotr Kubaj freebsd_committer 2017-10-28 16:13:27 UTC
(In reply to Guido Falsi from comment #2)
It was actually a build-time problem, so a PORTREVISION bump was completely unnecessary.
Comment 4 Guido Falsi freebsd_committer 2017-10-28 17:18:54 UTC
Before committing I made a quick test with the port as is and it actually built for me, with IPV6 option on, which is the default.

I also did test it with IPV6 on and off before committing the update on the previous PR.

Also I cannot find any lighttpd build failure on the pkg-fallout mailing list [1], so it did build successfully in the cluster too.

So I actually think the PORTREVISION bump was needed.

[1] https://lists.freebsd.org/pipermail/freebsd-pkg-fallout/
Comment 5 Guido Falsi freebsd_committer 2017-10-28 17:20:54 UTC

You are right.

I just noticed misread the subject of this PR as "with IPV6". My fault.

I stand corrected. Unluckily there's nothing that can be done once portrevision is bumped.
Comment 6 edgeman 2017-10-31 14:28:27 UTC
This port still won't build for me with IPV6 turned off.
Builds fine with it on.
Errors in network.c referencing 6 vs 4 issues:
network.c:82:30: error: no member named 'sin6_port' in 'struct sockaddr_in'; did you mean 'sin_port'?
network.c:82:25: error: no member named 'ipv6' in 'union sock_addr'; did you mean 'ipv4'?
network.c:82:30: error: no member named 'sin6_port' in 'struct sockaddr_in'; did you mean 'sin_port'?

In make config I only have BZIP2, DOCS enabled. If I turn on IPV6 it builds.
Comment 7 Piotr Kubaj freebsd_committer 2017-10-31 14:56:25 UTC
Created attachment 187611 [details]

Sorry, here's a correct patch.

Note that this is a SVN patch, you can't just drop it into files/.
Comment 8 Piotr Kubaj freebsd_committer 2017-10-31 14:57:51 UTC
Changing status.
Comment 9 commit-hook freebsd_committer 2017-10-31 15:26:32 UTC
A commit references this bug:

Author: madpilot
Date: Tue Oct 31 15:26:06 UTC 2017
New revision: 453242
URL: https://svnweb.freebsd.org/changeset/ports/453242

  - Really fix build when IPV6 option is disabled
  - Correctly rename patch file

  PR:		223288
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl> (maintainer)
  Reported by:	edgeman@gmail.com

Comment 10 Guido Falsi freebsd_committer 2017-10-31 15:28:31 UTC
Fix committed.

The last patch you posted still contained errors, #elif in place of #else and ipv in place of ipv4.

Anyway I did an hasty job on my previous commit which is all my fault.

I committed a fixed version of the patch.
Comment 11 edgeman 2017-10-31 16:08:40 UTC
Builds for me now. Thanks!