diff mbox

usb-mtp: Add fallback definition of NAME_MAX

Message ID 20170903163455.15132-1-n54@gmx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kamil Rytarowski Sept. 3, 2017, 4:34 p.m. UTC
This fixes build on SmartOS (Joyent).

Patch cherry-picked from pkgsrc by jperkin (Joyent).

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
---
 hw/usb/dev-mtp.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Philippe Mathieu-Daudé Sept. 4, 2017, 12:35 a.m. UTC | #1
Hi Kamil,

On 09/03/2017 01:34 PM, Kamil Rytarowski wrote:
> This fixes build on SmartOS (Joyent).
> 
> Patch cherry-picked from pkgsrc by jperkin (Joyent).
> 
> Signed-off-by: Kamil Rytarowski <n54@gmx.com>
> ---
>   hw/usb/dev-mtp.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
> index 94c2e94f10..6e8d7b21b5 100644
> --- a/hw/usb/dev-mtp.c
> +++ b/hw/usb/dev-mtp.c
> @@ -26,6 +26,10 @@
>   #include "hw/usb.h"
>   #include "hw/usb/desc.h"
>   
> +#ifndef NAME_MAX
> +#define NAME_MAX 255
> +#endif

this belongs to include/qemu/osdep.h

once moved there:
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> +
>   /* ----------------------------------------------------------------------- */
>   
>   enum mtp_container_type {
> 

Regards,

Phil.
diff mbox

Patch

diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 94c2e94f10..6e8d7b21b5 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -26,6 +26,10 @@ 
 #include "hw/usb.h"
 #include "hw/usb/desc.h"
 
+#ifndef NAME_MAX
+#define NAME_MAX 255
+#endif
+
 /* ----------------------------------------------------------------------- */
 
 enum mtp_container_type {