Skip to contentSkip to conversation

src/main: Add missing pthread header

PATCH Applied Rosen Penev 2 participants 2 messages Mar 29, 2019

lore
Share & tools
lore

Rosen Penev

author
#0 lore raw

PATCH 1/1 src/main: Add missing pthread header

Otherwise compilation can fail with:

main.cpp: In function 'void one_measurement(int, int, char*)':
main.cpp:226:3: error: 'pthread_t' was not declared in this scope
pthread_t thread = 0UL;
^~~~~~~~~
main.cpp:226:3: note: suggested alternative: 'pread'
pthread_t thread = 0UL;
^~~~~~~~~
pread

et al.

Signed-off-by Rosen Penev <rosenp(a)gmail.com>
---
 src/main.cpp | 1 +
 1 file changed, 1 insertion(+)
src/main.cpp +1 -0
index cbb7a4e..75d4202 100644
@@ -39,6 +39,7 @@
 #include <locale.h>
 #include <sys/resource.h>
 #include <limits.h>
+#include <pthread.h>
 
 #include "cpu/cpu.h"
 #include "process/process.h"
Signature · 1 line
2.17.1
Applied
#1 lore raw

Thanks, Applied!

Quoted 43 lines

-----Original Message-----
From: PowerTop [mailto:powertop-bounces(a)lists.01.org] On Behalf Of Rosen Penev
Sent: Thursday, March 28, 2019 9:09 PM
To: powertop(a)lists.01.org
Subject: [Powertop] [PATCH] src/main: Add missing pthread header

Otherwise compilation can fail with:

main.cpp: In function 'void one_measurement(int, int, char*)':
main.cpp:226:3: error: 'pthread_t' was not declared in this scope

   pthread_t thread = 0UL;
   ^~~~~~~~~
main.cpp:226:3: note: suggested alternative: 'pread'
   pthread_t thread = 0UL;
   ^~~~~~~~~
   pread

et al.

Signed-off-by Rosen Penev <rosenp(a)gmail.com>
---
 src/main.cpp | 1 +
 1 file changed, 1 insertion(+)
src/main.cpp +1 -1
@@ -39,6 +39,7 @@
 #include <locale.h>
 #include <sys/resource.h>
 #include <limits.h>
+#include <pthread.h>
 
 #include "cpu/cpu.h"
 #include "process/process.h"
--

2.17.1

_______________________________________________
PowerTop mailing list
PowerTop(a)lists.01.org
https://lists.01.org/mailman/listinfo/powertop