2010-12-21 13:16:04 -05:00
|
|
|
$OpenBSD: patch-examples_sendfile_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
|
2009-03-31 09:37:16 -04:00
|
|
|
|
|
|
|
Fix compilation with GCC2.
|
|
|
|
|
2010-12-21 13:16:04 -05:00
|
|
|
--- examples/sendfile.c.orig Mon Jun 15 21:45:05 2009
|
|
|
|
+++ examples/sendfile.c Tue Dec 21 14:07:04 2010
|
|
|
|
@@ -48,13 +48,14 @@ void sendfile_usage(void)
|
2009-03-31 09:37:16 -04:00
|
|
|
|
|
|
|
int sendfile_function(char * from_path, char *to_path)
|
|
|
|
{
|
|
|
|
- printf("Sending %s to %s\n",from_path,to_path);
|
|
|
|
char *filename;
|
|
|
|
uint64_t filesize;
|
2010-12-21 13:16:04 -05:00
|
|
|
struct stat sb;
|
2009-03-31 09:37:16 -04:00
|
|
|
LIBMTP_file_t *genfile;
|
|
|
|
int ret;
|
|
|
|
uint32_t parent_id = 0;
|
|
|
|
+
|
|
|
|
+ printf("Sending %s to %s\n",from_path,to_path);
|
|
|
|
|
2010-12-21 13:16:04 -05:00
|
|
|
if ( stat(from_path, &sb) == -1 ) {
|
|
|
|
fprintf(stderr, "%s: ", from_path);
|