Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
dart_pdf
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Obezyan
2022-01-13 16:08:42 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Committed by
David PHAM-VAN
2022-01-15 09:43:05 -0400
Commit
9bf7a992b2c5b68eeb017b15f506d884628acc22
9bf7a992
1 parent
85731634
Replace function memfd_create by syscall(SYS_memfd_create) to reduce required glibc version
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
printing/CHANGELOG.md
printing/linux/print_job.cc
printing/CHANGELOG.md
View file @
9bf7a99
...
...
@@ -12,6 +12,7 @@
-
Use RENDER_MODE_FOR_DISPLAY on Android
-
Enable usage of printer's settings on Windows
[
Alban Lecuivre
]
-
Update android projects (mavenCentral, compileSdkVersion 30, gradle:4.1.0)
-
Use syscall(SYS_memfd_create) instead of glibc function memfd_create
## 5.6.6
...
...
printing/linux/print_job.cc
View file @
9bf7a99
...
...
@@ -17,9 +17,11 @@
#include "print_job.h"
#include <stdlib.h>
#include <sys/mman.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <linux/memfd.h>
#include <cstring>
#include <string>
...
...
@@ -200,7 +202,7 @@ bool print_job::print_pdf(const gchar* name,
}
void
print_job
::
write_job
(
const
uint8_t
data
[],
size_t
size
)
{
auto
fd
=
memfd_create
(
"printing"
,
0
);
auto
fd
=
syscall
(
SYS_memfd_create
,
"printing"
,
0
);
size_t
offset
=
0
;
ssize_t
n
;
while
((
n
=
write
(
fd
,
data
+
offset
,
size
-
offset
))
>=
0
&&
...
...
Please
register
or
login
to post a comment