Skip to content

Commit

Permalink
utils/common-ps: fix popen/pclose for Windows
Browse files Browse the repository at this point in the history
Broken in cbb6b96

Not strictly needed since hwloc-ps isn't built on Windows
and lstopo --ps does nothing there, but the build is easy to fix.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Feb 22, 2021
1 parent 5177f9c commit 5fd60f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/hwloc/common-ps.c
Expand Up @@ -247,6 +247,12 @@ int hwloc_ps_read_process(hwloc_topology_t topology, hwloc_const_bitmap_t topocp
return -1;
}

#ifdef HWLOC_WIN_SYS
/* hwloc-ps isn't built for Windows, but lstopo is */
#define popen _popen
#define pclose _pclose
#endif

void hwloc_ps_pidcmd(struct hwloc_ps_process *proc, const char *pidcmd)
{
char *cmd;
Expand Down

0 comments on commit 5fd60f7

Please sign in to comment.