On Thu, 13 Aug 2009 19:40:24 -0700, Nathan Coulson <conat...@gmail.com> wrote:
> I am having the following problems when compiling cdrtools with the latest
> book
> make[1]: Entering directory
> `/mnt/raid5/book/blfs/38/cdrtools-2.01/libschily'
>       ==> COMPILING "OBJ/x86_64-linux-cc/fexec.o"
> In file included from ../include/unixstd.h:37,
>                  from fexec.c:33:
> /usr/include/unistd.h:524: error: conflicting types for 'fexecve_'
> ../include/schily.h:114: note: previous declaration of 'fexecve_' was here
> fexec.c: In function 'fexecle':

I can reproduce this on a clean LFS-6.5-rc2 build.  It looks as it the
patch isn't enough to handle the getline, getdelim and fexecve functions in
newer Glibc's.  The attached patch lets things build for me.

Regards,

Matt.
Submitted By: Matt Burgess (matthew at linuxfromscratch dot org)
Date: 2009-08-14
Initial Package Version: 2.01
Origin: Matt Burgess
Upstream Status: Not submitted. 
Description: Fixes several function conflicts that occur between Cdrtools and
             Glibc 2.10.1.

diff -Naur cdrtools-2.01.orig/cdrecord/cue.c cdrtools-2.01/cdrecord/cue.c
--- cdrtools-2.01.orig/cdrecord/cue.c	2004-03-02 20:00:53.000000000 +0000
+++ cdrtools-2.01/cdrecord/cue.c	2009-08-15 11:39:28.000000000 +0000
@@ -249,7 +249,7 @@
 LOCAL	char	*peekword	__PR((void));
 LOCAL	char	*lineend	__PR((void));
 LOCAL	char	*markword	__PR((char *delim));
-LOCAL	char	getdelim	__PR((void));
+LOCAL	char	getdelim_	__PR((void));
 LOCAL	char	*getnextitem	__PR((char *delim));
 LOCAL	char	*neednextitem	__PR((char *delim));
 LOCAL	char	*nextword	__PR((void));
@@ -772,7 +772,7 @@
 	if (kp == NULL)
 		cueabort("Unknown filetype '%s'", word);
 
-	if (getdelim() == '/') {
+	if (getdelim_() == '/') {
 		word = needitem();
 		if (*astol(++word, &secsize) != '\0')
 			cueabort("Not a number '%s'", word);
@@ -1163,7 +1163,7 @@
 }
 
 LOCAL char
-getdelim()
+getdelim_()
 {
 	return (wordendc);
 }
diff -Naur cdrtools-2.01.orig/include/schily.h cdrtools-2.01/include/schily.h
--- cdrtools-2.01.orig/include/schily.h	2004-03-05 00:30:40.000000000 +0000
+++ cdrtools-2.01/include/schily.h	2009-08-15 11:40:34.000000000 +0000
@@ -108,7 +108,7 @@
 		/* 6th arg not const, fexecv forces av[ac] = NULL */
 extern	int	fexecv __PR((const char *, FILE *, FILE *, FILE *, int,
 							char **));
-extern	int	fexecve __PR((const char *, FILE *, FILE *, FILE *,
+extern	int	fexecve_ __PR((const char *, FILE *, FILE *, FILE *,
 					char * const *, char * const *));
 extern	int	fspawnv __PR((FILE *, FILE *, FILE *, int, char * const *));
 extern	int	fspawnl __PR((FILE *, FILE *, FILE *,
@@ -187,7 +187,7 @@
 extern	char	*findbytes __PR((const void *, int, char));
 extern	int	findline __PR((const char *, char, const char *,
 							int, char **, int));
-extern	int	getline __PR((char *, int));
+extern	int	getline_ __PR((char *, int));
 extern	int	getstr __PR((char *, int));
 extern	int	breakline __PR((char *, char, char **, int));
 extern	int	getallargs __PR((int *, char * const**, const char *, ...));
diff -Naur cdrtools-2.01.orig/libscg/scsitransp.c cdrtools-2.01/libscg/scsitransp.c
--- cdrtools-2.01.orig/libscg/scsitransp.c	2004-06-17 20:20:27.000000000 +0000
+++ cdrtools-2.01/libscg/scsitransp.c	2009-08-15 11:35:48.000000000 +0000
@@ -323,7 +323,7 @@
 
 	js_printf("%s", msg);
 	flush();
-	if (getline(okbuf, sizeof (okbuf)) == EOF)
+	if (getline_(okbuf, sizeof (okbuf)) == EOF)
 		exit(EX_BAD);
 	if (streql(okbuf, "y") || streql(okbuf, "yes") ||
 	    streql(okbuf, "Y") || streql(okbuf, "YES"))
diff -Naur cdrtools-2.01.orig/libschily/fexec.c cdrtools-2.01/libschily/fexec.c
--- cdrtools-2.01.orig/libschily/fexec.c	2004-06-06 11:50:24.000000000 +0000
+++ cdrtools-2.01/libschily/fexec.c	2009-08-15 11:40:59.000000000 +0000
@@ -159,7 +159,7 @@
 	} while (p != NULL);
 	va_end(args);
 
-	ret = fexecve(name, in, out, err, av, env);
+	ret = fexecve_(name, in, out, err, av, env);
 	if (av != xav)
 		free(av);
 	return (ret);
@@ -173,11 +173,11 @@
 	char *av[];
 {
 	av[ac] = NULL;			/*  force list to be null terminated */
-	return (fexecve(name, in, out, err, av, environ));
+	return (fexecve_(name, in, out, err, av, environ));
 }
 
 EXPORT int
-fexecve(name, in, out, err, av, env)
+fexecve_(name, in, out, err, av, env)
 	const char *name;
 	FILE *in, *out, *err;
 	char * const av[], * const env[];
diff -Naur cdrtools-2.01.orig/readcd/io.c cdrtools-2.01/readcd/io.c
--- cdrtools-2.01.orig/readcd/io.c	2002-12-25 14:13:28.000000000 +0000
+++ cdrtools-2.01/readcd/io.c	2009-08-15 11:36:06.000000000 +0000
@@ -138,7 +138,7 @@
 		(*prt)(s, *lp, mini, maxi, dp);
 		flush();
 		line[0] = '\0';
-		if (getline(line, 80) == EOF)
+		if (getline_(line, 80) == EOF)
 			exit(EX_BAD);
 
 		linep = skipwhite(line);
@@ -205,7 +205,7 @@
 	printf("%r", form, args);
 	va_end(args);
 	flush();
-	if (getline(okbuf, sizeof(okbuf)) == EOF)
+	if (getline_(okbuf, sizeof(okbuf)) == EOF)
 		exit(EX_BAD);
 	if (okbuf[0] == '?') {
 		printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n");
diff -Naur cdrtools-2.01.orig/readcd/readcd.c cdrtools-2.01/readcd/readcd.c
--- cdrtools-2.01.orig/readcd/readcd.c	2004-09-08 17:24:14.000000000 +0000
+++ cdrtools-2.01/readcd/readcd.c	2009-08-15 11:33:55.000000000 +0000
@@ -1651,7 +1651,7 @@
 		error("Copy from SCSI (%d,%d,%d) disk to file\n",
 					scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
 		error("Enter filename [%s]: ", defname); flush();
-		(void) getline(filename, sizeof (filename));
+		(void) getline_(filename, sizeof (filename));
 	}
 
 	if (askrange) {
@@ -1820,7 +1820,7 @@
 		error("Copy from file to SCSI (%d,%d,%d) disk\n",
 					scg_scsibus(scgp), scg_target(scgp), scg_lun(scgp));
 		error("Enter filename [%s]: ", defname); flush();
-		(void) getline(filename, sizeof (filename));
+		(void) getline_(filename, sizeof (filename));
 		error("Notice: reading from file always starts at file offset 0.\n");
 
 		getlong("Enter starting sector for copy:", &addr, 0L, end-1);
diff -Naur cdrtools-2.01.orig/scgcheck/dmaresid.c cdrtools-2.01/scgcheck/dmaresid.c
--- cdrtools-2.01.orig/scgcheck/dmaresid.c	2004-09-08 17:45:22.000000000 +0000
+++ cdrtools-2.01/scgcheck/dmaresid.c	2009-08-15 11:34:17.000000000 +0000
@@ -64,7 +64,7 @@
 	printf("Ready to start test for working DMA residual count? Enter <CR> to continue: ");
 	fprintf(logfile, "**********> Testing for working DMA residual count.\n");
 	flushit();
-	(void) getline(abuf, sizeof (abuf));
+	(void) getline_(abuf, sizeof (abuf));
 
 	printf("**********> Testing for working DMA residual count == 0.\n");
 	fprintf(logfile, "**********> Testing for working DMA residual count == 0.\n");
@@ -95,7 +95,7 @@
 	printf("Ready to start test for working DMA residual count == DMA count? Enter <CR> to continue: ");
 	fprintf(logfile, "**********> Testing for working DMA residual count == DMA count.\n");
 	flushit();
-	(void) getline(abuf, sizeof (abuf));
+	(void) getline_(abuf, sizeof (abuf));
 	passed = TRUE;
 	dmacnt = cnt;
 	ret = xtinquiry(scgp, 0, dmacnt);
@@ -130,7 +130,7 @@
 	printf("Ready to start test for working DMA residual count == 1? Enter <CR> to continue: ");
 	fprintf(logfile, "**********> Testing for working DMA residual count == 1.\n");
 	flushit();
-	(void) getline(abuf, sizeof (abuf));
+	(void) getline_(abuf, sizeof (abuf));
 	passed = TRUE;
 	dmacnt = cnt+1;
 	ret = xtinquiry(scgp, cnt, dmacnt);
diff -Naur cdrtools-2.01.orig/scgcheck/scgcheck.c cdrtools-2.01/scgcheck/scgcheck.c
--- cdrtools-2.01.orig/scgcheck/scgcheck.c	2004-09-08 17:49:48.000000000 +0000
+++ cdrtools-2.01/scgcheck/scgcheck.c	2009-08-15 11:34:54.000000000 +0000
@@ -189,7 +189,7 @@
 			break;
 		error("Enter SCSI device name for bus scanning [%s]: ", device);
 		flushit();
-		(void) getline(device, sizeof (device));
+		(void) getline_(device, sizeof (device));
 		if (device[0] == '\0')
 			strcpy(device, "0,6,0");
 
@@ -227,7 +227,7 @@
 	do {
 		error("Enter SCSI device name [%s]: ", device);
 		flushit();
-		(void) getline(device, sizeof (device));
+		(void) getline_(device, sizeof (device));
 		if (device[0] == '\0')
 			strcpy(device, "0,6,0");
 
@@ -256,7 +256,7 @@
 
 	printf("Ready to start test for second SCSI open? Enter <CR> to continue: ");
 	flushit();
-	(void) getline(abuf, sizeof (abuf));
+	(void) getline_(abuf, sizeof (abuf));
 #define	CHECK_SECOND_OPEN
 #ifdef	CHECK_SECOND_OPEN
 	if (!streql(abuf, "n")) {
@@ -344,7 +344,7 @@
 
 	printf("Ready to start test for succeeded command? Enter <CR> to continue: ");
 	flushit();
-	(void) getline(abuf, sizeof (abuf));
+	(void) getline_(abuf, sizeof (abuf));
 	scgp->verbose++;
 	ret = inquiry(scgp, buf, sizeof (struct scsi_inquiry));
 	scg_vsetup(scgp);
diff -Naur cdrtools-2.01.orig/scgcheck/sense.c cdrtools-2.01/scgcheck/sense.c
--- cdrtools-2.01.orig/scgcheck/sense.c	2003-03-27 10:59:52.000000000 +0000
+++ cdrtools-2.01/scgcheck/sense.c	2009-08-15 11:33:26.000000000 +0000
@@ -66,7 +66,7 @@
 	printf("Ready to start test for failing command? Enter <CR> to continue: ");
 	fprintf(logfile, "**********> Testing for failed SCSI command.\n");
 	flushit();
-	(void)getline(abuf, sizeof(abuf));
+	(void)getline_(abuf, sizeof(abuf));
 /*	scgp->verbose++;*/
 	fillbytes(buf, sizeof(struct scsi_inquiry), '\0');
 	fillbytes((caddr_t)scgp->scmd, sizeof(*scgp->scmd), '\0');
@@ -82,13 +82,13 @@
 		printf("the test utility. Otherwise remove any medium from the drive.\n");
 		printf("Ready to start test for failing command? Enter <CR> to continue: ");
 		flushit();
-		(void)getline(abuf, sizeof(abuf));
+		(void)getline_(abuf, sizeof(abuf));
 		ret = test_unit_ready(scgp);
 		if (ret >= 0 || !scg_cmd_err(scgp)) {
 			printf("Test Unit Ready did not fail.\n");
 			printf("Ready to eject tray? Enter <CR> to continue: ");
 			flushit();
-			(void)getline(abuf, sizeof(abuf));
+			(void)getline_(abuf, sizeof(abuf));
 			scsi_unload(scgp, (cdr_t *)0);
 			ret = test_unit_ready(scgp);
 		}
@@ -127,7 +127,7 @@
 	printf("Ready to start test for sense data count? Enter <CR> to continue: ");
 	fprintf(logfile, "**********> Testing for SCSI sense data count.\n");
 	flushit();
-	(void)getline(abuf, sizeof(abuf));
+	(void)getline_(abuf, sizeof(abuf));
 	printf("Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
 	fprintf(logfile, "**********> Testing if at least CCS_SENSE_LEN (%d) is supported...\n", CCS_SENSE_LEN);
 	ret = sensecount(scgp, CCS_SENSE_LEN);
diff -Naur cdrtools-2.01.orig/scgskeleton/io.c cdrtools-2.01/scgskeleton/io.c
--- cdrtools-2.01.orig/scgskeleton/io.c	2002-12-25 14:13:28.000000000 +0000
+++ cdrtools-2.01/scgskeleton/io.c	2009-08-15 11:36:06.000000000 +0000
@@ -138,7 +138,7 @@
 		(*prt)(s, *lp, mini, maxi, dp);
 		flush();
 		line[0] = '\0';
-		if (getline(line, 80) == EOF)
+		if (getline_(line, 80) == EOF)
 			exit(EX_BAD);
 
 		linep = skipwhite(line);
@@ -205,7 +205,7 @@
 	printf("%r", form, args);
 	va_end(args);
 	flush();
-	if (getline(okbuf, sizeof(okbuf)) == EOF)
+	if (getline_(okbuf, sizeof(okbuf)) == EOF)
 		exit(EX_BAD);
 	if (okbuf[0] == '?') {
 		printf("Enter 'y', 'Y', 'yes' or 'YES' if you agree with the previous asked question.\n");
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to