Skip to content

Commit

Permalink
rdc_sampler: include <assert.h> that is missing in <rdc/rdc.h>
Browse files Browse the repository at this point in the history
In at least ROCm 6.2.1, rdc/rdc.h forgot to include <assert.h>.

Include <assert.h> for it.
  • Loading branch information
morrone authored and tom95858 committed Nov 12, 2024
1 parent bd693fa commit c7e6d3b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ m4_ifndef([PKG_CHECK_MODULES],
[m4_fatal([pkg.m4 not found. Please install pkg-config (Ubuntu) or pkgconfig (RHEL) package])])
PKG_PROG_PKG_CONFIG

# <rdc/rdc.h> fails to include <assert.h> in at least rocm 6.2.1, hence the
# include of assert.h here.
AC_LIB_HAVE_LINKFLAGS([rdc_bootstrap], [], [
#include <assert.h>
#include <rdc/rdc.h>
])
AM_CONDITIONAL([HAVE_LIBRDC_BOOTSTRAP], [test "x$HAVE_LIBRDC_BOOTSTRAP" = xyes])
Expand Down
3 changes: 3 additions & 0 deletions ldms/src/sampler/rdc_sampler/rdcinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
#include "ldmsd.h"
#include "ovis_json/ovis_json.h"
#include "sampler_base.h"
/* rdc/rdc.h in at least ROCm 6.2.1 forget to include <assert.h>, so we
* include it here for them before including <rdc/rdc.h> */
#include <assert.h>
#include <rdc/rdc.h>

#define SAMP "rdc_sampler"
Expand Down

0 comments on commit c7e6d3b

Please sign in to comment.