Skip to content

Commit

Permalink
include bits/stdc++.h only when using libstdc++
Browse files Browse the repository at this point in the history
We have other c++ runtime implementations e.g. llvm's libc++ which does
not provide this header bits/stdc++.h, therefore make sure that this
header is only included when using libstdc++

Fixes
| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/cannelloni/1.1.0/git/tcpthread.cpp:27:10: fatal error: 'bits/stdc++.h' file not found
|    27 | #include <bits/stdc++.h>
|       |          ^~~~~~~~~~~~~~~

Upstream-Status: Submitted [#56]
Signed-off-by: Khem Raj <[email protected]>
  • Loading branch information
kraj committed Nov 14, 2023
1 parent 76fff56 commit a26565e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tcpthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
#include <cstdint>
#include <cstdio>

#ifdef __GLIBCXX__
#include <bits/stdc++.h>
#endif

#include <linux/can.h>
#include <string.h>
Expand Down

0 comments on commit a26565e

Please sign in to comment.