All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ibsim/sim_cmd.c: Add ULLONG_MAX if not defined
@ 2015-04-22  6:21 Ilya Nelkenbaum
       [not found] ` <1429683713-19991-1-git-send-email-ilyan-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Ilya Nelkenbaum @ 2015-04-22  6:21 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
  Cc: hal-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb, Ilya Nelkenbaum

From: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

In old glibc versions (< 2.9.90) it is not defined

Signed-off-by: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
 ibsim/sim_cmd.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ibsim/sim_cmd.c b/ibsim/sim_cmd.c
index 4822a0b..249228a 100644
--- a/ibsim/sim_cmd.c
+++ b/ibsim/sim_cmd.c
@@ -934,6 +934,11 @@ static int do_perf_counter_set(FILE *f, char *line)
 		field_trim--;
 	*(field_trim + 1) = 0;
 
+#ifndef ULLONG_MAX
+/* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */
+#   define ULLONG_MAX   18446744073709551615ULL
+#endif
+
 	errno = 0;
 	value = strtoull(s, &val_error, 0);
 	if((value == 0 || value == ULLONG_MAX) && errno != 0) {
-- 
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ibsim/sim_cmd.c: Add ULLONG_MAX if not defined
       [not found] ` <1429683713-19991-1-git-send-email-ilyan-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2015-04-22 11:49   ` Hal Rosenstock
  0 siblings, 0 replies; 2+ messages in thread
From: Hal Rosenstock @ 2015-04-22 11:49 UTC (permalink / raw)
  To: Ilya Nelkenbaum; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Ilya Nelkenbaum

On 4/22/2015 2:21 AM, Ilya Nelkenbaum wrote:
> From: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> In old glibc versions (< 2.9.90) it is not defined
> 
> Signed-off-by: Ilya Nelkenbaum <ilyan-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

Thanks. Applied.

-- Hal
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-22 11:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-22  6:21 [PATCH] ibsim/sim_cmd.c: Add ULLONG_MAX if not defined Ilya Nelkenbaum
     [not found] ` <1429683713-19991-1-git-send-email-ilyan-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2015-04-22 11:49   ` Hal Rosenstock

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.