Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 598822

Summary: mail-mta/opensmtpd-6.0.2_p1-r1: fails to build: error: ‘WAIT_MYPGRP’ undeclared
Product: Gentoo Linux Reporter: Michel Ganguin <ganguin>
Component: Current packagesAssignee: Jason A. Donenfeld <zx2c4>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michel Ganguin 2016-11-03 08:17:51 UTC
USE="libressl mta pam" emerge =mail-mta/opensmtpd-6.0.2_p1-r1

fails with error: 
../../smtpd/smtpd.c: In function ‘parent_shutdown’:
../../smtpd/smtpd.c:329:17: error: ‘WAIT_MYPGRP’ undeclared (first use in this function)
   pid = waitpid(WAIT_MYPGRP, NULL, 0);


Reproducible: Always

Steps to Reproduce:
1. USE="libressl mta pam" emerge =mail-mta/opensmtpd-6.0.2_p1-r1
Actual Results:  
compile fails

Expected Results:  
build successfully

Autoconf detects that WAIT_MYPGRP is not available and sets HAVE_DECL_WAIT_MYPGRP to 0:
config.log:| #define HAVE_DECL_WAIT_MYPGRP 0

However the source code uses a #ifndef:
openbsd-compat/openbsd-compat.h:#ifndef HAVE_DECL_WAIT_MYPGRP

As a workaround I changed this line to:
openbsd-compat/openbsd-compat.h:#if HAVE_DECL_WAIT_MYPGRP != 1

With this change it builds correctly.