• 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/linux-zigbee/0002-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch
Thomas PetazzoniThomas Petazzoni committed 8457c2190a908 Aug 2016
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 8cc60d618f81f2eeaa926cd60ed9b55ee6cda6ea Mon Sep 17 00:00:00 2001
2
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3
Date: Mon, 8 Aug 2016 15:42:46 +0200
4
Subject: [PATCH] addrdb/coord-config-parse.y: add missing <time.h> include
5
MIME-Version: 1.0
6
Content-Type: text/plain; charset=UTF-8
7
Content-Transfer-Encoding: 8bit
8
​
9
The %union definition uses the time_t structure. In order to use this
10
structure, the <time.h> header has to be included. Otherwise, the build
11
breaks with some C libraries, such as musl:
12
​
13
In file included from coord-config-lex.l:23:0:
14
coord-config-parse.y:107:2: error: unknown type name ‘time_t’
15
  time_t timestamp;
16
  ^
17
​
18
This patch includes <time.h> using the '%code requires' directive of
19
Yacc.
20
​
21
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
22
---
23
 addrdb/coord-config-parse.y | 4 ++++
24
 1 file changed, 4 insertions(+)
25
​
26
diff --git a/addrdb/coord-config-parse.y b/addrdb/coord-config-parse.y
27
index 2e10a88..85ee058 100644
28
--- a/addrdb/coord-config-parse.y
29
+++ b/addrdb/coord-config-parse.y
30
@@ -102,6 +102,10 @@
31
 
32
 %}
33
 
34
+%code requires {
35
+#include <time.h>
36
+}
37
+
38
 %union {
39
    unsigned long number;
40
    time_t timestamp;
41
-- 
42
2.7.4
43
​
  • 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.