Conditionalise st_blksize
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@675 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -823,7 +823,9 @@ retrieve(char *cmd, char *name) | |||||||
| 		(void) sprintf(line, cmd, name), name = line; | 		(void) sprintf(line, cmd, name), name = line; | ||||||
| 		fin = ftpd_popen(line, "r"), closefunc = ftpd_pclose; | 		fin = ftpd_popen(line, "r"), closefunc = ftpd_pclose; | ||||||
| 		st.st_size = -1; | 		st.st_size = -1; | ||||||
|  | #ifdef HAVE_ST_BLKSIZE | ||||||
| 		st.st_blksize = BUFSIZ; | 		st.st_blksize = BUFSIZ; | ||||||
|  | #endif | ||||||
| 	} | 	} | ||||||
| 	if (fin == NULL) { | 	if (fin == NULL) { | ||||||
| 		if (errno != 0) { | 		if (errno != 0) { | ||||||
| @@ -863,7 +865,11 @@ retrieve(char *cmd, char *name) | |||||||
| 	if (dout == NULL) | 	if (dout == NULL) | ||||||
| 		goto done; | 		goto done; | ||||||
| 	set_buffer_size(fileno(dout), 0); | 	set_buffer_size(fileno(dout), 0); | ||||||
|  | #ifdef HAVE_ST_BLKSIZE | ||||||
| 	send_data(fin, dout, st.st_blksize); | 	send_data(fin, dout, st.st_blksize); | ||||||
|  | #else | ||||||
|  | 	send_data(fin, dout, BUFSIZ); | ||||||
|  | #endif | ||||||
| 	(void) fclose(dout); | 	(void) fclose(dout); | ||||||
| 	data = -1; | 	data = -1; | ||||||
| 	pdata = -1; | 	pdata = -1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Johan Danielsson
					Johan Danielsson