Skip to content

Commit

Permalink
hyprcursors: test patching
Browse files Browse the repository at this point in the history
  • Loading branch information
zen0bit committed Mar 18, 2024
1 parent 45f24da commit b50acd6
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From 59acebef20051167c5c458d82150c54925319db8 Mon Sep 17 00:00:00 2001
From: solopasha <[email protected]>
Date: Sat, 16 Mar 2024 20:03:39 +0300
Subject: [PATCH] cmake: correct includedir permissions (#7)

no need to set 777
---
CMakeLists.txt | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index be38f90..a229cdf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,8 +70,5 @@ add_test(NAME "Test libhyprcursor in C" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/te
add_dependencies(tests hyprcursor_test_c)

# Installation
-install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} DIRECTORY_PERMISSIONS
- OWNER_WRITE OWNER_READ OWNER_EXECUTE
- GROUP_WRITE GROUP_READ GROUP_EXECUTE
- WORLD_WRITE WORLD_READ WORLD_EXECUTE)
+install(DIRECTORY "include/hyprcursor" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
install(FILES ${CMAKE_BINARY_DIR}/hyprcursor.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
23 changes: 23 additions & 0 deletions srcpkgs/hyprcursor/patches/lib_avoid_arithmetic_on_void.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 60f9c53cf2e482c4ee9d2ce2f9c6f26af2f76a91 Mon Sep 17 00:00:00 2001
From: Vaxry <[email protected]>
Date: Sat, 16 Mar 2024 16:39:14 +0000
Subject: [PATCH] lib: avoid arithmetic on void*

fixes #8
---
libhyprcursor/hyprcursor.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp
index 6e5bb0c..5de9daf 100644
--- a/libhyprcursor/hyprcursor.cpp
+++ b/libhyprcursor/hyprcursor.cpp
@@ -508,7 +508,7 @@ static cairo_status_t readPNG(void* data, unsigned char* output, unsigned int le

size_t toRead = len > DATA->dataLen - DATA->readNeedle ? DATA->dataLen - DATA->readNeedle : len;

- std::memcpy(output, DATA->data + DATA->readNeedle, toRead);
+ std::memcpy(output, (uint8_t*)DATA->data + DATA->readNeedle, toRead);
DATA->readNeedle += toRead;

if (DATA->readNeedle >= DATA->dataLen) {

0 comments on commit b50acd6

Please sign in to comment.