Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
4324fb2f
Commit
4324fb2f
authored
Jan 24, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input/Offset: add macro PRIoffset
parent
e4cb74cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
Offset.hxx
src/input/Offset.hxx
+6
-0
CurlInputPlugin.cxx
src/input/plugins/CurlInputPlugin.cxx
+3
-1
No files found.
src/input/Offset.hxx
View file @
4324fb2f
...
...
@@ -29,4 +29,10 @@
*/
typedef
uint64_t
offset_type
;
/**
* To format an offset_type with printf(). To use this, include
* <cinttypes>.
*/
#define PRIoffset PRIu64
#endif
src/input/plugins/CurlInputPlugin.cxx
View file @
4324fb2f
...
...
@@ -44,6 +44,8 @@
#include "Log.hxx"
#include "PluginUnavailable.hxx"
#include <cinttypes>
#include <assert.h>
#include <string.h>
...
...
@@ -423,7 +425,7 @@ CurlInputStream::SeekInternal(offset_type new_offset)
if
(
offset
>
0
)
{
char
range
[
32
];
sprintf
(
range
,
"%
llu-"
,
(
unsigned
long
long
)
offset
);
sprintf
(
range
,
"%
"
PRIoffset
"-"
,
offset
);
request
->
SetOption
(
CURLOPT_RANGE
,
range
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment