Skip to content

Commit 65ae2ef

Browse files
jbeichammen99
authored andcommitted
Unbreak build on FreeBSD (#188)
* notifications: use glib type of unsigned long after bad121a src/panel/widgets/notifications/notification-info.cpp:54:5: error: unknown type name 'ulong' ulong pixel_size = (channels * bits_per_sample + 7) / 8; ^ src/panel/widgets/notifications/notification-info.cpp:55:40: error: expected ')' if (data_var.get_size() != ((ulong)height - 1) * (ulong)rowstride + (ulong)width * pixel_size) ^ src/panel/widgets/notifications/notification-info.cpp:55:32: note: to match this '(' if (data_var.get_size() != ((ulong)height - 1) * (ulong)rowstride + (ulong)width * pixel_size) ^ src/panel/widgets/notifications/notification-info.cpp:55:34: error: use of undeclared identifier 'ulong' if (data_var.get_size() != ((ulong)height - 1) * (ulong)rowstride + (ulong)width * pixel_size) ^ src/panel/widgets/notifications/notification-info.cpp:55:55: error: use of undeclared identifier 'ulong' if (data_var.get_size() != ((ulong)height - 1) * (ulong)rowstride + (ulong)width * pixel_size) ^ src/panel/widgets/notifications/notification-info.cpp:55:61: error: expected ')' if (data_var.get_size() != ((ulong)height - 1) * (ulong)rowstride + (ulong)width * pixel_size) ^ src/panel/widgets/notifications/notification-info.cpp:55:8: note: to match this '(' if (data_var.get_size() != ((ulong)height - 1) * (ulong)rowstride + (ulong)width * pixel_size) ^ * command-output: add missing header for libc++ 14 after ff9f791 src/panel/widgets/command-output.cpp:25:30: error: implicit instantiation of undefined template 'std::array<char, 16>' std::array<char, 16> buffer; ^ /usr/include/c++/v1/__tuple:219:64: note: template is declared here template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array; ^
1 parent d135bbc commit 65ae2ef

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/panel/widgets/command-output.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
#include <gtkmm/tooltip.h>
88

9+
#include <array>
10+
911
#include <gtk-utils.hpp>
1012

1113
static void label_set_from_command(std::string command_line,

src/panel/widgets/notifications/notification-info.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ Glib::RefPtr<Gdk::Pixbuf> pixbufFromVariant(const Glib::VariantBase & variant)
5151
iter.next_value(data_var);
5252

5353
// for integer positive A, floor((A + 7) / 8) = ceil(A / 8)
54-
ulong pixel_size = (channels * bits_per_sample + 7) / 8;
55-
if (data_var.get_size() != ((ulong)height - 1) * (ulong)rowstride + (ulong)width * pixel_size)
54+
gulong pixel_size = (channels * bits_per_sample + 7) / 8;
55+
if (data_var.get_size() != ((gulong)height - 1) * (gulong)rowstride + (gulong)width * pixel_size)
5656
{
5757
throw std::invalid_argument(
5858
"Cannot create pixbuf from variant: expected data size doesn't equal actual one.");

0 commit comments

Comments
 (0)