diff mbox series

[3/4] common/types.h: Wrap #define UUID_STR_LEN 36 in #ifndef

Message ID 20181128165649.56853-4-jtulak@redhat.com (mailing list archive)
State New, archived
Headers show
Series xfsdump: a little bit of cleaning | expand

Commit Message

Jan Tulak Nov. 28, 2018, 4:56 p.m. UTC
Current Fedora 28 has the constant it in uuid/uuid.h where it belongs (per
comment next to the define), so we should treat the define as a
backward-compatibility workaround, rather than enforcing it for all.

Signed-off-by: Jan Tulak <jtulak@redhat.com>
---
 common/types.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Eric Sandeen Dec. 6, 2018, 10:38 p.m. UTC | #1
On 11/28/18 10:56 AM, Jan Tulak wrote:
> Current Fedora 28 has the constant it in uuid/uuid.h where it belongs (per
> comment next to the define), so we should treat the define as a
> backward-compatibility workaround, rather than enforcing it for all.
> 
> Signed-off-by: Jan Tulak <jtulak@redhat.com>

so I think the comment can use an update too, but I'll just do that
on checkin:

- * Should be, but isn't, defined in uuid/uuid.h
+ * If not defined in uuid/uuid.h

[sandeen: tweak comment to match]
Reviewed-by: Eric Sandeen <sandeen@redhat.com>


> ---
>  common/types.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/common/types.h b/common/types.h
> index 50c841e..096c5b7 100644
> --- a/common/types.h
> +++ b/common/types.h
> @@ -35,7 +35,9 @@
>  /*
>   * Should be, but isn't, defined in uuid/uuid.h
>   */
> +#ifndef UUID_STR_LEN
>  #define UUID_STR_LEN	36
> +#endif
>  
>  /* fundamental page size - probably should not be hardwired, but
>   * for now we will
>
diff mbox series

Patch

diff --git a/common/types.h b/common/types.h
index 50c841e..096c5b7 100644
--- a/common/types.h
+++ b/common/types.h
@@ -35,7 +35,9 @@ 
 /*
  * Should be, but isn't, defined in uuid/uuid.h
  */
+#ifndef UUID_STR_LEN
 #define UUID_STR_LEN	36
+#endif
 
 /* fundamental page size - probably should not be hardwired, but
  * for now we will