[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 3/6] daemon/Win32: NAME_MAX does not exist on Windows, use FILENAME_MAX instead.



-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html
>From 7d8a3404b27fcd71f84dbe4c022c4435d0070d6b Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones redhat com>
Date: Fri, 20 Nov 2009 10:36:59 +0000
Subject: [PATCH 3/6] daemon/Win32: NAME_MAX does not exist on Windows, use FILENAME_MAX instead.

---
 daemon/realpath.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/daemon/realpath.c b/daemon/realpath.c
index 17e74ea..02a82d6 100644
--- a/daemon/realpath.c
+++ b/daemon/realpath.c
@@ -32,6 +32,11 @@
 #include "daemon.h"
 #include "actions.h"
 
+/* On Windows, NAME_MAX is not defined. */
+#ifndef NAME_MAX
+#define NAME_MAX FILENAME_MAX
+#endif
+
 char *
 do_realpath (const char *path)
 {
-- 
1.6.5.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]