• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/oprofile/0001-Include-time.h-for-nanosleep.patch
Thomas PetazzoniThomas Petazzoni committed 699c320094829 Dec 2014
Raw file
Source viewDiff to previous
 
1
From c5b93c33a81d7c52dc6089387e415f2d653f758f Mon Sep 17 00:00:00 2001
2
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3
Date: Mon, 29 Dec 2014 11:43:51 +0100
4
Subject: [PATCH] Include <time.h> for nanosleep()
5
​
6
The nanosleep() function prototype is in <time.h>, so this header file
7
should be included whenever nanosleep() is used. Not including it
8
causes some issues when building OProfile against a non-thread capable
9
version of the uClibc C library, probably because in such situation,
10
<time.h> does not get included by another header.
11
​
12
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
13
---
14
 pe_counting/ocount.cpp | 1 +
15
 pe_profiling/operf.cpp | 1 +
16
 2 files changed, 2 insertions(+)
17
​
18
diff --git a/pe_counting/ocount.cpp b/pe_counting/ocount.cpp
19
index 07dfd0c..fba29eb 100644
20
--- a/pe_counting/ocount.cpp
21
+++ b/pe_counting/ocount.cpp
22
@@ -28,6 +28,7 @@
23
 #include <getopt.h>
24
 #include <sys/time.h>
25
 #include <math.h>
26
+#include <time.h>
27
 
28
 #include "op_pe_utils.h"
29
 #include "ocount_counter.h"
30
diff --git a/pe_profiling/operf.cpp b/pe_profiling/operf.cpp
31
index 04a25d9..4238754 100644
32
--- a/pe_profiling/operf.cpp
33
+++ b/pe_profiling/operf.cpp
34
@@ -33,6 +33,7 @@
35
 #include <sys/wait.h>
36
 #include <ftw.h>
37
 #include <getopt.h>
38
+#include <time.h>
39
 #include <iostream>
40
 #include "operf_utils.h"
41
 #include "op_pe_utils.h"
42
-- 
43
2.1.0
44
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.