This seems to be the relevant part from the doc (located here: 
https://man.openbsd.org/getservent.3):

int getservbyname_r(const char *name, const char *proto, struct servent 
*servent, struct servent_data *servent_data);

I checked out the line from the source (security-util.c line 3318)
  r = getservbyname_r(service, proto, &sp, buf, 2048, &result);

So there definitely is a mismatch in parameters. It also looks like that area 
of code already has some logic for switching between a 5 parameter call and a 6 
parameter call; I guess when I sit back down in front of the system in question 
I will see if I can get enough of a handle on the code to write the 4 parameter 
call.
________________________________________
From: Jean-Louis Martineau [jmartin...@carbonite.com]
Sent: Tuesday, August 01, 2017 5:11 PM
To: Eric Lovelace; amanda-users@amanda.org
Subject: Re: Compiling 3.4.5 on OpenBSD 6.1

How getservbyname_r is defined on OpenBSD 6.1

Jean-Louis

On 01/08/17 04:28 PM, Eric Lovelace wrote:
> Hello,
>
> I would like to run Amanda on OpenBSD (Ideally with current versions of
> each). From what I have found online, this was possible in previous
> versions of both softwares but I canĀ¹t find any examples with more recent
> versions; is this setup still supported? I ran into an issue with the
> default make command (that apparently the Makefile used some GNU make
> exclusive features), but using gmake seemed to advance the progress a
> little further. Has anyone encountered anything similar and been able to
> get it working? Thanks in advance!
>
> The error from running gmake
> ============================
> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../config -I../gnulib
> -I../common-src -fno-strict-aliasing -D_GNU_SOURCE -I/usr/include -pthread
> -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
> -I/usr/local/include -Wall -Wextra -Wparentheses
> -Wdeclaration-after-statement -Wmissing-prototypes -Wstrict-prototypes
> -Wmissing-declarations -Wformat -Wformat-security -Wsign-compare
> -Wfloat-equal -Wold-style-definition -Wno-strict-aliasing
> -Wno-unknown-pragmas -Wno-deprecated-declarations
> -DAMANDA_FILE=\"security-util.c\" -g -O2 -fno-strict-aliasing -MT
> security-util.lo -MD -MP -MF .deps/security-util.Tpo -c security-util.c
> -fPIC -DPIC -o .libs/security-util.o
> security-util.c: In function 'find_port_for_service':
> security-util.c:3318: warning: passing argument 4 of 'getservbyname_r'
> from incompatible pointer type
> security-util.c:3318: error: too many arguments to function
> 'getservbyname_r'
> gmake[3]: *** [Makefile:2479: security-util.lo] Error 1
> gmake[3]: Leaving directory '/root/amanda-3.4.5/common-src'
> gmake[2]: *** [Makefile:2123: all] Error 2
> gmake[2]: Leaving directory '/root/amanda-3.4.5/common-src'
> gmake[1]: *** [Makefile:1717: all-recursive] Error 1
> gmake[1]: Leaving directory '/root/amanda-3.4.5'
> gmake: *** [Makefile:1641: all] Error 2
>
>
>
>
> The results from ./configure
> ============================
> Directories:
> Application: /usr/local/libexec/amanda/application
> Configuration: /usr/local/etc/amanda
> GNU Tar lists: /usr/local/var/amanda/gnutar-lists
> Perl modules (amperldir): /usr/local/libdata/perl5/site_perl
> Template and example data files (amdatadir): /usr/local/share/amanda
> Temporary: /tmp/amanda
> WARNINGS:
> no user specified (--with-user) -- using 'amanda'
> no group specified (--with-group) -- using 'backup'
> /bin/tar is not GNU tar, so it will not be used.
> /usr/local/bin/smbclient does not seem to be smbclient.
>
>


Reply via email to