diff options
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/Makefile.am | 3 | ||||
| -rw-r--r-- | dev/lckdclient.c | 1 | ||||
| -rw-r--r-- | dev/main.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/dev/Makefile.am b/dev/Makefile.am index 4833728..d116581 100644 --- a/dev/Makefile.am +++ b/dev/Makefile.am | |||
| @@ -16,4 +16,5 @@ lckd_client_LDADD = ../src/libiphone.la | |||
| 16 | afccheck_SOURCES = afccheck.c | 16 | afccheck_SOURCES = afccheck.c |
| 17 | afccheck_CFLAGS = $(AM_CFLAGS) | 17 | afccheck_CFLAGS = $(AM_CFLAGS) |
| 18 | afccheck_LDFLAGS = $(AM_LDFLAGS) | 18 | afccheck_LDFLAGS = $(AM_LDFLAGS) |
| 19 | afccheck_LDADD = ../src/libiphone.la \ No newline at end of file | 19 | afccheck_LDADD = ../src/libiphone.la |
| 20 | |||
diff --git a/dev/lckdclient.c b/dev/lckdclient.c index 96bc27d..c96f052 100644 --- a/dev/lckdclient.c +++ b/dev/lckdclient.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include <stdio.h> | 22 | #include <stdio.h> |
| 23 | #include <stdlib.h> | ||
| 23 | #include <string.h> | 24 | #include <string.h> |
| 24 | #include <glib.h> | 25 | #include <glib.h> |
| 25 | #include <readline/readline.h> | 26 | #include <readline/readline.h> |
| @@ -87,7 +87,7 @@ int main(int argc, char *argv[]) | |||
| 87 | iphone_afc_get_file_attr(afc, "/iTunesOnTheGoPlaylist.plist", &stbuf); | 87 | iphone_afc_get_file_attr(afc, "/iTunesOnTheGoPlaylist.plist", &stbuf); |
| 88 | if (IPHONE_E_SUCCESS == | 88 | if (IPHONE_E_SUCCESS == |
| 89 | iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", IPHONE_AFC_FILE_READ, &my_file) && my_file) { | 89 | iphone_afc_open_file(afc, "/iTunesOnTheGoPlaylist.plist", IPHONE_AFC_FILE_READ, &my_file) && my_file) { |
| 90 | printf("A file size: %i\n", stbuf.st_size); | 90 | printf("A file size: %i\n", (int) stbuf.st_size); |
| 91 | char *file_data = (char *) malloc(sizeof(char) * stbuf.st_size); | 91 | char *file_data = (char *) malloc(sizeof(char) * stbuf.st_size); |
| 92 | iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes); | 92 | iphone_afc_read_file(afc, my_file, file_data, stbuf.st_size, &bytes); |
| 93 | if (bytes >= 0) { | 93 | if (bytes >= 0) { |
