Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 May 2011 10:34:24 GMT
From:      bf <bf@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/157233: [PATCH] ftp/lftp: fix build on -current
Message-ID:  <201105211034.p4LAYOeV000351@red.freebsd.org>
Resent-Message-ID: <201105211040.p4LAeDfN064599@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         157233
>Category:       ports
>Synopsis:       [PATCH] ftp/lftp: fix build on -current
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 21 10:40:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     bf
>Release:        FreeBSD 9 amd64
>Organization:
-
>Environment:
>Description:
On 18 May 2011, mdf@ added an implementation of posix_fallocate() to -current:

http://svnweb.FreeBSD.org/base?view=revision&revision=220791

The lftp configure script detects this and sets HAVE_POSIX_FALLOCATE in ${WRKSRC}/confdefs.h.  This breaks the build because ${WRKSRC}/src/Torrent.cc then attempts to use posix_fallocate() with POSIX_FADV_SEQUENTIAL and POSIX_FADV_NOREUSE, and FreeBSD still does not have POSIX_FADV*.  To fix the build, disable the detection of posix_fallocate() in the configure script.

While here, remove the explicit addition of CPPFLAGS to CONFIGURE_ENV: that is now done in bsd.port.mk.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/ftp/lftp/Makefile,v
retrieving revision 1.158
diff -u -r1.158 Makefile
--- Makefile	16 May 2011 12:14:34 -0000	1.158
+++ Makefile	21 May 2011 10:31:08 -0000
@@ -27,8 +27,11 @@
 USE_ICONV=	yes
 USE_GZIP=	yes
 
+CPPFLAGS+=	-I${LOCALBASE}/include
 GNU_CONFIGURE=	yes
-CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
+#FreeBSD 9.x has posix_fallocate() for OSVERSION > 900035,
+#but is missing the  required POSIX_FADV_* macros
+CONFIGURE_ENV=	i_cv_posix_fallocate_works=no \
 		LIBS="-L${LOCALBASE}/lib"
 MAKE_JOBS_SAFE=	yes
 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105211034.p4LAYOeV000351>