Skip to content

Commit 18f5643

Browse files
author
sergei
authored
[SYCL] Fix compilation for RHEL 7 with glibc 2.17 and earlier (intel#4711)
This patch defines macro `__STDC_FORMAT_MACROS` which was removed from glibc 2.18 to fix the issue ``` /../dpcpp-compiler/bin/../include/sycl/CL/sycl/queue.hpp:1208:44: error: expected ')' "%s:%d: %s: global id: [%" PRIu64 ",%" PRIu64 ",%" PRIu64 ```
1 parent 0d7a8cf commit 18f5643

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sycl/include/CL/sycl/queue.hpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
#include <CL/sycl/property_list.hpp>
2323
#include <CL/sycl/stl.hpp>
2424

25-
#include <inttypes.h>
25+
// Explicitly request format macros
26+
#ifndef __STDC_FORMAT_MACROS
27+
#define __STDC_FORMAT_MACROS 1
28+
#endif
29+
#include <cinttypes>
2630
#include <utility>
2731

2832
// having _TWO_ mid-param #ifdefs makes the functions very difficult to read.

0 commit comments

Comments
 (0)