Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

../../include/tscore/ink_hrtime.h:38:9: error: 'int64_t' does not name a type #5103

Closed
jbergstroem opened this issue Mar 1, 2019 · 1 comment · Fixed by #5105
Closed

Comments

@jbergstroem
Copy link
Contributor

jbergstroem commented Mar 1, 2019

Environment:

  • apache traffic server 8.0.2 as well as latest git
  • alpine edge, meaning gcc 8.3 and musl.

It looks like include/tscore/ink_hrtime.h is missing a include <stdint.h>. After I add it, compilation proceeds.

  CXX      RecRawStats.o
In file included from ../../include/tscore/ink_thread.h:31,
                 from P_RecCore.h:26,
                 from RecRawStats.cc:24:
../../include/tscore/ink_hrtime.h:38:9: error: 'int64_t' does not name a type; did you mean 'ino64_t'?
 typedef int64_t ink_hrtime;
         ^~~~~~~
         ino64_t
../../include/tscore/ink_hrtime.h:41:54: error: 'int64_t' has not been declared
 char *int64_to_str(char *buf, unsigned int buf_size, int64_t val, unsigned int *total_chars, unsigned int req_width = 0,
                                                      ^~~~~~~
@jbergstroem
Copy link
Contributor Author

jbergstroem commented Mar 1, 2019

Tenative fix:

diff --git a/include/tscore/ink_hrtime.h b/include/tscore/ink_hrtime.h
index a1405a98c..60a418140 100644
--- a/include/tscore/ink_hrtime.h
+++ b/include/tscore/ink_hrtime.h
@@ -33,6 +33,7 @@
 #include "tscore/ink_config.h"
 #include "tscore/ink_assert.h"
 #include <ctime>
+#include <stdint.h>
 #include <sys/time.h>
 #include <cstdlib>
 typedef int64_t ink_hrtime;

Steps to reproduce:

$ git clone https://github.com/jbergstroem/ts-alpine
$ cd ts-alpine
$ git checkout 1661df7 # fixed in a newer version by applying patches
$ docker build .

jbergstroem pushed a commit to jbergstroem/trafficserver that referenced this issue Mar 1, 2019
On alpine linux 3.9 and edge the compliation was failing becuase of
a missing import.

Refs: apache#5103
jbergstroem pushed a commit to jbergstroem/trafficserver that referenced this issue Mar 1, 2019
On alpine linux 3.9 (and edge) the compilation was failing
because of a missing import.

Refs: apache#5103
jbergstroem pushed a commit to jbergstroem/trafficserver that referenced this issue Mar 5, 2019
On alpine linux 3.9 (and edge) the compilation was failing
because of a missing import.

Refs: apache#5103
masaori335 pushed a commit that referenced this issue Mar 5, 2019
On alpine linux 3.9 (and edge) the compilation was failing
because of a missing import.

Refs: #5103
bryancall pushed a commit that referenced this issue Mar 27, 2019
On alpine linux 3.9 (and edge) the compilation was failing
because of a missing import.

Refs: #5103
(cherry picked from commit e0c6dc1)
zwoop pushed a commit that referenced this issue Oct 8, 2019
On alpine linux 3.9 (and edge) the compilation was failing
because of a missing import.

Refs: #5103
(cherry picked from commit e0c6dc1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant