openbsd-ports/devel/libmtp/patches/patch-examples_newfolder_c
jasper 8756029f01 - update libmtp to 1.0.3
from LEVAI Daniel, with some tweaks by me
ok william@ (MAINTAINER)
2010-12-21 18:16:04 +00:00

21 lines
685 B
Plaintext

$OpenBSD: patch-examples_newfolder_c,v 1.2 2010/12/21 18:16:04 jasper Exp $
Fix compilation with GCC2.
--- examples/newfolder.c.orig Thu May 7 01:04:19 2009
+++ examples/newfolder.c Tue Dec 21 14:03:42 2010
@@ -54,11 +54,12 @@ void newfolder_command (int argc, char **argv)
void
newfolder_function(char * path)
{
- printf("Creating new folder %s\n",path);
char * parent = dirname(path);
char * folder = basename(path);
int id = parse_path (parent,files,folders);
int newid = LIBMTP_Create_Folder(device, folder, id, 0);
+
+ printf("Creating new folder %s\n",path);
if (newid == 0) {
printf("Folder creation failed.\n");
LIBMTP_Dump_Errorstack(device);