build: Add missing includes

Fixes #2614
Ref: https://gcc.gnu.org/gcc-12/porting_to.html
This commit is contained in:
patrick96 2022-03-02 14:58:47 +01:00 committed by Patrick Ziegler
parent 4350e356a7
commit 24e079afef
8 changed files with 30 additions and 19 deletions

View File

@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Build ### Build
- Compiler warning in clang-13 ([`#2613`](https://github.com/polybar/polybar/pull/2613)) - Fixed compiler warning in Clang 13 ([`#2613`](https://github.com/polybar/polybar/pull/2613))
- Fixed compiler error in GCC 12 ([`#2616`](https://github.com/polybar/polybar/pull/2616), [`#2614`](https://github.com/polybar/polybar/issues/2614))
## [3.6.0] - 2022-03-01 ## [3.6.0] - 2022-03-01
### Breaking ### Breaking

View File

@ -5,6 +5,7 @@
#include <algorithm> #include <algorithm>
#include <cmath> #include <cmath>
#include <deque> #include <deque>
#include <iterator>
#include "cairo/font.hpp" #include "cairo/font.hpp"
#include "cairo/surface.hpp" #include "cairo/surface.hpp"
@ -117,9 +118,12 @@ namespace cairo {
context& operator<<(const rounded_corners& c) { context& operator<<(const rounded_corners& c) {
cairo_new_sub_path(m_c); cairo_new_sub_path(m_c);
cairo_arc(m_c, c.x + c.w - c.radius.top_right, c.y + c.radius.top_right, c.radius.top_right, -90 * degree, 0 * degree); cairo_arc(
cairo_arc(m_c, c.x + c.w - c.radius.bottom_right, c.y + c.h - c.radius.bottom_right, c.radius.bottom_right, 0 * degree, 90 * degree); m_c, c.x + c.w - c.radius.top_right, c.y + c.radius.top_right, c.radius.top_right, -90 * degree, 0 * degree);
cairo_arc(m_c, c.x + c.radius.bottom_left, c.y + c.h - c.radius.bottom_left, c.radius.bottom_left, 90 * degree, 180 * degree); cairo_arc(m_c, c.x + c.w - c.radius.bottom_right, c.y + c.h - c.radius.bottom_right, c.radius.bottom_right,
0 * degree, 90 * degree);
cairo_arc(m_c, c.x + c.radius.bottom_left, c.y + c.h - c.radius.bottom_left, c.radius.bottom_left, 90 * degree,
180 * degree);
cairo_arc(m_c, c.x + c.radius.top_left, c.y + c.radius.top_left, c.radius.top_left, 180 * degree, 270 * degree); cairo_arc(m_c, c.x + c.radius.top_left, c.y + c.radius.top_left, c.radius.top_left, 180 * degree, 270 * degree);
cairo_close_path(m_c); cairo_close_path(m_c);
return *this; return *this;
@ -142,7 +146,8 @@ namespace cairo {
cairo_rel_line_to(m_c, 0, segment.w); cairo_rel_line_to(m_c, 0, segment.w);
break; break;
} }
cairo_arc_negative(m_c, segment.x, segment.y, segment.radius - segment.w, segment.angle_to * degree, segment.angle_from * degree); cairo_arc_negative(m_c, segment.x, segment.y, segment.radius - segment.w, segment.angle_to * degree,
segment.angle_from * degree);
cairo_close_path(m_c); cairo_close_path(m_c);
return *this; return *this;
} }

View File

@ -2,6 +2,8 @@
#include "common.hpp" #include "common.hpp"
#include <array>
POLYBAR_NS POLYBAR_NS
/** /**

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include <atomic>
#include <ctime> #include <ctime>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>

View File

@ -1,7 +1,5 @@
#pragma once #pragma once
#include <utility>
#include "components/config.hpp" #include "components/config.hpp"
#include "modules/meta/timer_module.hpp" #include "modules/meta/timer_module.hpp"
#include "settings.hpp" #include "settings.hpp"

View File

@ -1,5 +1,7 @@
#pragma once #pragma once
#include <atomic>
#include "modules/meta/timer_module.hpp" #include "modules/meta/timer_module.hpp"
#include "settings.hpp" #include "settings.hpp"
#include "utils/http.hpp" #include "utils/http.hpp"

View File

@ -1,9 +1,10 @@
#include "adapters/net.hpp"
#include <linux/nl80211.h> #include <linux/nl80211.h>
#include <netlink/genl/ctrl.h> #include <netlink/genl/ctrl.h>
#include <netlink/genl/genl.h> #include <netlink/genl/genl.h>
#include <algorithm>
#include "adapters/net.hpp"
#include "utils/file.hpp" #include "utils/file.hpp"
POLYBAR_NS POLYBAR_NS

View File

@ -3,6 +3,7 @@
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <fstream> #include <fstream>
#include <utility>
#include "drawtypes/label.hpp" #include "drawtypes/label.hpp"
#include "drawtypes/progressbar.hpp" #include "drawtypes/progressbar.hpp"