summaryrefslogtreecommitdiff
path: root/rss/rssparser.cpp
diff options
context:
space:
mode:
authorGravatar Tobias Kortkamp <t@tobik.me> 2019-06-26 06:25:57 +0200
committerGravatar Tobias Kortkamp <t@tobik.me> 2019-06-26 06:25:57 +0200
commit8724aa4f2bc815aef864edacdb062f0157b8dcc0 (patch)
treea14aa059bc5f27626967f531e1423a05efe465de /rss/rssparser.cpp
parent373f69f9f0a1f4356627ec33212405721eb5ee05 (diff)
downloadnewsboat-8724aa4f2bc815aef864edacdb062f0157b8dcc0.tar.gz
newsboat-8724aa4f2bc815aef864edacdb062f0157b8dcc0.tar.zst
newsboat-8724aa4f2bc815aef864edacdb062f0157b8dcc0.zip
Fix build on FreeBSD
``` In file included from src/scopemeasure.cpp:1: include/scopemeasure.h:18:17: error: field has incomplete type 'struct timeval' struct timeval tv1, tv2; ^ include/scopemeasure.h:18:9: note: forward declaration of 'newsboat::timeval' struct timeval tv1, tv2; ^ include/scopemeasure.h:18:22: error: field has incomplete type 'struct timeval' struct timeval tv1, tv2; ^ include/scopemeasure.h:18:9: note: forward declaration of 'newsboat::timeval' struct timeval tv1, tv2; ^ 2 errors generated. [...] In file included from src/filebrowserformaction.cpp:1: include/filebrowserformaction.h:43:20: error: unknown type name 'mode_t'; did you mean '__mode_t'? char get_filetype(mode_t mode); ^~~~~~ __mode_t /usr/include/sys/_types.h:51:20: note: '__mode_t' declared here typedef __uint16_t __mode_t; /* permissions */ ^ In file included from src/filebrowserformaction.cpp:1: include/filebrowserformaction.h:44:24: error: unknown type name 'uid_t'; did you mean 'gid_t'? std::string get_owner(uid_t uid); ^~~~~ gid_t /usr/include/grp.h:49:18: note: 'gid_t' declared here typedef __gid_t gid_t; ^ In file included from src/filebrowserformaction.cpp:1: include/filebrowserformaction.h:47:59: error: unknown type name 'mode_t'; did you mean '__mode_t'? get_formatted_filename(std::string filename, char ftype, mode_t mode); ^~~~~~ __mode_t /usr/include/sys/_types.h:51:20: note: '__mode_t' declared here typedef __uint16_t __mode_t; /* permissions */ ^ 3 errors generated. [...] In file included from src/newsblururlreader.cpp:1: In file included from include/newsblururlreader.h:4: In file included from ./rss/feed.h:7: rss/item.h:43:2: error: unknown type name 'time_t' time_t pubDate_ts; ^ 1 error generated. [...] rss/rssparser.cpp:91:12: error: variable has incomplete type 'struct tm' struct tm stm; ^ /usr/include/wchar.h:111:8: note: forward declaration of 'tm' struct tm; ^ rss/rssparser.cpp:135:2: error: unknown type name 'time_t' time_t gmttime = mktime(&stm) + offs; ^ 2 errors generated. ``` Signed-off-by: Tobias Kortkamp <t@tobik.me>
Diffstat (limited to '')
-rw-r--r--rss/rssparser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/rss/rssparser.cpp b/rss/rssparser.cpp
index 8285573f..d46b91df 100644
--- a/rss/rssparser.cpp
+++ b/rss/rssparser.cpp
@@ -1,6 +1,7 @@
#include "rssparser.h"
#include <cstring>
+#include <ctime>
#include <libxml/tree.h>
#include "exception.h"