Skip to content

Commit

Permalink
Define MIN for environments that lack it
Browse files Browse the repository at this point in the history
Signed-off-by: Ralph Castain <rhc@pmix.org>
  • Loading branch information
rhc54 committed Jan 25, 2023
1 parent 2de57f7 commit 944e119
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/mca/oob/tcp/oob_tcp_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* Copyright (c) 2020 Amazon.com, Inc. or its affiliates. All Rights
* reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -60,6 +60,10 @@
#include <ctype.h>
#include <sys/socket.h>

#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif

#include "src/class/pmix_list.h"
#include "src/event/event-internal.h"
#include "src/include/prte_socket_errno.h"
Expand Down
6 changes: 5 additions & 1 deletion src/mca/prtereachable/netlink/reachable_netlink_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (c) 2015-2020 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2017 Amazon.com, Inc. or its affiliates.
* All Rights reserved.
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -20,6 +20,10 @@
# include <math.h>
#endif

#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif

#include "libnl_utils.h"
#include "reachable_netlink.h"
#include "src/mca/prtereachable/base/base.h"
Expand Down
6 changes: 5 additions & 1 deletion src/mca/prtereachable/weighted/reachable_weighted.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Copyright (c) 2017 Amazon.com, Inc. or its affiliates.
* All Rights reserved.
* Copyright (c) 2020 Cisco Systems, Inc. All rights reserved
* Copyright (c) 2021-2022 Nanook Consulting. All rights reserved.
* Copyright (c) 2021-2023 Nanook Consulting. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -28,6 +28,10 @@
# include <math.h>
#endif

#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif

#include "reachable_weighted.h"
#include "src/mca/prtereachable/base/base.h"
#include "src/util/pmix_if.h"
Expand Down

0 comments on commit 944e119

Please sign in to comment.