1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2024-11-18 13:55:11 -05:00

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]
### 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
### Breaking

View file

@ -5,6 +5,7 @@
#include <algorithm>
#include <cmath>
#include <deque>
#include <iterator>
#include "cairo/font.hpp"
#include "cairo/surface.hpp"
@ -117,9 +118,12 @@ namespace cairo {
context& operator<<(const rounded_corners& 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(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.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.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_close_path(m_c);
return *this;
@ -142,7 +146,8 @@ namespace cairo {
cairo_rel_line_to(m_c, 0, segment.w);
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);
return *this;
}

View file

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

View file

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

View file

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

View file

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

View file

@ -1,9 +1,10 @@
#include "adapters/net.hpp"
#include <linux/nl80211.h>
#include <netlink/genl/ctrl.h>
#include <netlink/genl/genl.h>
#include <algorithm>
#include "adapters/net.hpp"
#include "utils/file.hpp"
POLYBAR_NS
@ -166,8 +167,8 @@ namespace net {
m_essid.clear();
if (bss[NL80211_BSS_INFORMATION_ELEMENTS] != nullptr) {
// Information Element ID from ieee80211.h
#define WLAN_EID_SSID 0
// Information Element ID from ieee80211.h
#define WLAN_EID_SSID 0
auto ies = static_cast<char*>(nla_data(bss[NL80211_BSS_INFORMATION_ELEMENTS]));
auto ies_len = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]);

View file

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