summaryrefslogtreecommitdiff
path: root/Libraries/LibC/scanf.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-29 21:02:13 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-29 21:02:13 +0200
commit6d7854919a95a6c276cf88598c9cac025b4db6d9 (patch)
tree941e3211ca0030ba2a4676a650c78a5b74396587 /Libraries/LibC/scanf.cpp
parent3900eebf15683d160047cb7ef7755fa6c1313ef2 (diff)
downloadserenity-6d7854919a95a6c276cf88598c9cac025b4db6d9.zip
LibC: Some build fixes for strange platforms
Patch from Anonymous.
Diffstat (limited to 'Libraries/LibC/scanf.cpp')
-rw-r--r--Libraries/LibC/scanf.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibC/scanf.cpp b/Libraries/LibC/scanf.cpp
index bbf86cd1b5..3f2cf97b7a 100644
--- a/Libraries/LibC/scanf.cpp
+++ b/Libraries/LibC/scanf.cpp
@@ -30,6 +30,7 @@
*/
#include <ctype.h>
#include <stdarg.h>
+#include <stdint.h>
#include <stdio.h>
#include <string.h>
@@ -60,7 +61,8 @@ static const char* determine_base(const char* p, int& base)
static int _atob(unsigned long* vp, const char* p, int base)
{
unsigned long value, v1, v2;
- char *q, tmp[20];
+ const char *q;
+ char tmp[20];
int digit;
if (p[0] == '0' && (p[1] == 'x' || p[1] == 'X')) {