summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 a40a233..9c3ed57 100644
--- a/utils/MTP/beastpatcher/Makefile
+++ b/utils/MTP/beastpatcher/Makefile
@@ -19,6 +19,9 @@ LIBS = /usr/lib/libmtp.a /usr/lib/libusb.a
CFLAGS += $(shell printf \
'\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
gcc -E -P - -o - | grep -q '^libmtp version: 0\.2' && echo '-DOLDMTP')
+CFLAGS += $(shell printf \
+ '\#include <libmtp.h>\nlibmtp version: LIBMTP_VERSION\n' | \
+ gcc -E -P - -o - | grep -q '^libmtp version: 0\.2\.[0-5]' && echo '-DREALLYOLDMTP')
endif
WINLIBS = ../MTP_DLL.dll
diff --git a/utils/MTP/beastpatcher/mtp_libmtp.c b/utils/MTP/beastpatcher/mtp_libmtp.c
index ed2d32b..c29e527 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)
else
{
/* NOTE: These strings are filled with zeros in mtp_init() */
-
+#ifndef REALLYOLDMTP
if ((str = LIBMTP_Get_Manufacturername(mtp_info->device)))
{
strncpy(mtp_info->manufacturer, str, sizeof(mtp_info->manufacturer)-1);
}
+#else
+ strcpy(mtp_info->manufacturer, "(unknown manufacturer)");
+#endif
if ((str = LIBMTP_Get_Modelname(mtp_info->device)))
{