Bug 235302 - net/libvncserver: error: use of undeclared identifier 'AF_INET'
Summary: net/libvncserver: error: use of undeclared identifier 'AF_INET'
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Marcelo Araujo
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-29 18:01 UTC by O. Hartmann
Modified: 2019-01-31 02:03 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (araujo)


Attachments
new patch for within the port's files directory (272 bytes, patch)
2019-01-30 03:55 UTC, Chad Jacob Milios
milios: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2019-01-29 18:01:28 UTC
Recent ports tree update renders port compilation of net/libvncserver failure with the error shown below; building host is CURRENT (FreeBSD 13.0-CURRENT #127 r343535: Mon Jan 28 21:34:05 CET 2019 amd64):

[...]
/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:206:9: warning: implicit declaration of function 'getsockname' is invalid in C99 [-Wimplicit-function-declaration]
    if (getsockname(client->sock, (struct sockaddr*)&localAddress, &addressLength)) {
        ^
/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:211:35: error: use of undeclared identifier 'AF_INET'
    if (localAddress.ss_family == AF_INET) {
                                  ^
/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:213:19: error: use of undeclared identifier 'AF_INET'
        inet_ntop(AF_INET, &(sa_in->sin_addr), buf, INET_ADDRSTRLEN);
                  ^
/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:216:42: error: use of undeclared identifier 'AF_INET6'
    } else if (localAddress.ss_family == AF_INET6) {
                                         ^
/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.12/libvncclient/sasl.c:218:19: error: use of undeclared identifier 'AF_INET6'
        inet_ntop(AF_INET6, &(sa_in->sin6_addr), buf, INET6_ADDRSTRLEN);
Comment 1 Chad Jacob Milios 2019-01-29 20:18:05 UTC
same for me on 11.2-RELEASE-p4/amd64
Comment 2 Chad Jacob Milios 2019-01-30 03:55:06 UTC
Created attachment 201519 [details]
new patch for within the port's files directory

i had success with this patch. i only needed to create this file, not modify any others, so its just a new file for within the files directory of the port. its not an svn diff or diff -r
Comment 3 Marcelo Araujo freebsd_committer freebsd_triage 2019-01-30 04:01:04 UTC
(In reply to Chad Jacob Milios from comment #2)


Where did you place the header files are specifically for WIN32, I think the right place to add those includes is in the sasl.h header.

Best,
Comment 4 Chad Jacob Milios 2019-01-30 04:03:16 UTC
since bugzilla seems to lose it, the name of the attachment must be patch-libvncclient_sasl.c (in /usr/ports/net/libvncserver/files/)
Comment 5 Chad Jacob Milios 2019-01-30 04:07:41 UTC
i put the lines within the #else of an #ifdef WIN32 so basically non-WIN32, i thought
Comment 6 Marcelo Araujo freebsd_committer freebsd_triage 2019-01-30 04:09:31 UTC
(In reply to Chad Jacob Milios from comment #5)

True, I have overseeing it.. thanks!
Comment 7 commit-hook freebsd_committer freebsd_triage 2019-01-31 01:47:58 UTC
A commit references this bug:

Author: araujo
Date: Thu Jan 31 01:47:02 UTC 2019
New revision: 491673
URL: https://svnweb.freebsd.org/changeset/ports/491673

Log:
  - Add CMAKE options properly.
  - Add SASL as an OPTIONS_DEFINE.
  - Bump PORTREVISION.

  PR:		234929 and 235302
  Submitted by:	Derek Schrock <dereks@lifeofadishwasher.com>,
  		O. Hartmann <ohartmann@walstatt.org>,
  		Chad Jacob Milios <milios@ccsys.com>
  Tested by:	many
  Differential Revision:	https://reviews.freebsd.org/D19009

Changes:
  head/net/libvncserver/Makefile
  head/net/libvncserver/files/patch-libvncclient_sasl.c