summaryrefslogtreecommitdiff
path: root/utils/MTP
diff options
context:
space:
mode:
Diffstat (limited to 'utils/MTP')
-rw-r--r--utils/MTP/beastpatcher/Makefile3
-rw-r--r--utils/MTP/beastpatcher/mtp_libmtp.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/utils/MTP/beastpatcher/Makefile b/utils/MTP/beastpatcher/Makefile
index a40a2338f0..9c3ed571ee 100644
--- a/utils/MTP/beastpatcher/Makefile
+++ b/utils/MTP/beastpatcher/Makefile
@@ -19,6 +19,9 @@ LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a
19CFLAGS += $(shell printf \ 19CFLAGS += $(shell printf \
20 '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \ 20 '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
21 gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP') 21 gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
22CFLAGS += $(shell printf \
23 '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
24 gcc -E -P - -o - | grep -q '^libmtp version: 0\.2\.[0-5]' && echo '-DREALLYOLDMTP')
22endif 25endif
23WINLIBS = ../MTP_DLL.dll 26WINLIBS = ../MTP_DLL.dll
24 27
diff --git a/utils/MTP/beastpatcher/mtp_libmtp.c b/utils/MTP/beastpatcher/mtp_libmtp.c
index ed2d32b85f..c29e5277b2 100644
--- a/utils/MTP/beastpatcher/mtp_libmtp.c
+++ b/utils/MTP/beastpatcher/mtp_libmtp.c
@@ -78,11 +78,14 @@ int mtp_scan(struct mtp_info_t* mtp_info)
78 else 78 else
79 { 79 {
80 /* NOTE: These strings are filled with zeros in mtp_init() */ 80 /* NOTE: These strings are filled with zeros in mtp_init() */
81 81#ifndef REALLYOLDMTP
82 if ((str = LIBMTP_Get_Manufacturername(mtp_info->device))) 82 if ((str = LIBMTP_Get_Manufacturername(mtp_info->device)))
83 { 83 {
84 strncpy(mtp_info->manufacturer, str, sizeof(mtp_info->manufacturer)-1); 84 strncpy(mtp_info->manufacturer, str, sizeof(mtp_info->manufacturer)-1);
85 } 85 }
86#else
87 strcpy(mtp_info->manufacturer, "(unknown manufacturer)");
88#endif
86 89
87 if ((str = LIBMTP_Get_Modelname(mtp_info->device))) 90 if ((str = LIBMTP_Get_Modelname(mtp_info->device)))
88 { 91 {