Skip to content

Commit dfaeb83

Browse files
committed
---
yaml --- r: 140462 b: refs/heads/try2 c: 3b299e8 h: refs/heads/master v: v3
1 parent 89efb0b commit dfaeb83

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8f2d71ac009e1f93c14266ecebb1c105a0a907e3
8+
refs/heads/try2: 3b299e8140326fbb3eee0e6274110c0b00019c26
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/rt/rust_android_dummy.cpp

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
44

5+
#ifdef __ANDROID__
6+
57
#include "rust_android_dummy.h"
68
#include <math.h>
79
#include <errno.h>
810

9-
#ifdef __ANDROID__
10-
1111
int backtrace(void **array, int size) { return 0; }
1212

1313
char **backtrace_symbols(void *const *array, int size) { return 0; }
@@ -59,7 +59,21 @@ extern "C" void srand()
5959
extern "C" void atof()
6060
{
6161
}
62+
6263
extern "C" void tgammaf()
6364
{
6465
}
66+
67+
extern "C" int glob(const char *pattern,
68+
int flags,
69+
int (*errfunc) (const char *epath, int eerrno),
70+
glob_t *pglob)
71+
{
72+
return 0;
73+
}
74+
75+
extern "C" void globfree(glob_t *pglob)
76+
{
77+
}
78+
6579
#endif

branches/try2/src/rt/rust_android_dummy.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,27 @@ char **backtrace_symbols (void *__const *__array, int __size);
1111

1212
void backtrace_symbols_fd (void *__const *__array, int __size, int __fd);
1313

14+
#include <sys/types.h>
15+
16+
struct stat;
17+
typedef struct {
18+
size_t gl_pathc; /* Count of total paths so far. */
19+
size_t gl_matchc; /* Count of paths matching pattern. */
20+
size_t gl_offs; /* Reserved at beginning of gl_pathv. */
21+
int gl_flags; /* Copy of flags parameter to glob. */
22+
char **gl_pathv; /* List of paths matching pattern. */
23+
/* Copy of errfunc parameter to glob. */
24+
int (*gl_errfunc)(const char *, int);
25+
26+
/*
27+
* Alternate filesystem access methods for glob; replacement
28+
* versions of closedir(3), readdir(3), opendir(3), stat(2)
29+
* and lstat(2).
30+
*/
31+
void (*gl_closedir)(void *);
32+
struct dirent *(*gl_readdir)(void *);
33+
void *(*gl_opendir)(const char *);
34+
int (*gl_lstat)(const char *, struct stat *);
35+
} glob_t;
36+
1437
#endif

0 commit comments

Comments
 (0)